Hmm, don't know about Qt4 but in Qt3 you could set the text of a column that was not visible and use it as a "tag" or whatever to identify an item. In your case that would be something like this when creating the item:
QListViewItem* item = new QListViewItem(parent);
// Add the other fields
item
->setText
(4,
QString::number(yourNumber
));
// 4 = the fifth column (not visible)
QListViewItem* item = new QListViewItem(parent);
// Add the other fields
item->setText(4, QString::number(yourNumber)); // 4 = the fifth column (not visible)
To copy to clipboard, switch view to plain text mode
Bookmarks