I created the QTableWidgetItem using the Qt::UserRole type.The text always appears. Did I read your response incorrectly or is there more to this?Qt Code:
To copy to clipboard, switch view to plain text mode
I created the QTableWidgetItem using the Qt::UserRole type.The text always appears. Did I read your response incorrectly or is there more to this?Qt Code:
To copy to clipboard, switch view to plain text mode
Yes, read it again and read the docs again - you're using Qt::DisplayRole because of incorrect use of the constructor (the second parameter doesn't determine the role but the type of item). It won't sort according to UserRole anyway... You'll still have to subclass and reimplement the operator and if you do, you don't need the additional role (and even if you don't want to sort images, you'll probably want to use the ToolTipRole anyway).
mclark (27th October 2006)
Bookmarks