Since QTableWidgetItem is not a QObject, you can try and create a widget which subclasses from QTableWidgetItem:
Qt Code:
{ ... };To copy to clipboard, switch view to plain text mode
Then you can cast your pointer to both QWitdget and QTableWidgetItem allowing you use it both in setCellWidget as well as setItem() allowing you to use the model view part for the selctions and the visible part of cell widget.
I never tried it so no warranty on this ;-)
Bookmarks