I've been getting started with the documented example for the C++ version of Qt 
as integrated into Eclipse. I know C++, but am working in Java, converting the 
example code as I go. I come to this:

  if (!name.isEmpty() && !email.isEmpty()) {
    QListWidgetItem *item = new QListWidgetItem(name, ui.addressList);
    item->setData(Qt::UserRole, email);
    ui.addressList->setCurrentItem(item);
  }


It's that setData() method that's puzzling me. My interpretation is that the 
list item, as well as having the string that it appears in the list with, can 
also have an attached piece of data. In this case it's being used to hold the 
email address.

Assuming that's right, or even if it isn't, what's the QtJambi equivalent of 
setdata()? It doesn't seem to have that method or anything similar.



      

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to