fruzzo
23rd May 2011, 11:06
Hi,
I'm trying to implement MyCustomStandardItem (inherited from QStandardItem) which has to contain some standard data (i.e. QString, QIcon, etc.) to visualize in a tree view and a list of events associated to the item (QList<Event>, where --> typedef QPair<QDataTime, int> Event) to not visualize in the same tree view...
Now...I want to visualize the list of events associated to each item through a tootip but I have some problem to retrieve the item events list starting from the item index...I try this solution:
MyCustomStandardItem* item = static_cast<MyCustomStandardItem*>(itemIndex.internalPointer());
item != NULL, but it crash just after a call an item member function.
I'm trying to implement MyCustomStandardItem (inherited from QStandardItem) which has to contain some standard data (i.e. QString, QIcon, etc.) to visualize in a tree view and a list of events associated to the item (QList<Event>, where --> typedef QPair<QDataTime, int> Event) to not visualize in the same tree view...
Now...I want to visualize the list of events associated to each item through a tootip but I have some problem to retrieve the item events list starting from the item index...I try this solution:
MyCustomStandardItem* item = static_cast<MyCustomStandardItem*>(itemIndex.internalPointer());
item != NULL, but it crash just after a call an item member function.