At another QT forum I asked about stream and pointer: http://www.qtforum.org/thread.php?threadid=19550 and founded answer. Today I found this: http://www.qtcentre.org/forum/f-newb...void-3247.html. Because I'm not sure I ask more precision:
If I want put into stream pointer to QTableWidgetItem I do this like that:
My question: how check if the item readed and reinterpret from stream is already in memory (is not destroyed by another process in my program - my tree is dynamic playerlist and can be change by another playerlist)? "if (item)" is enough?Qt Code:
QTreeWidgetItem *item; QDataStream stream_items; int i; (...) // to stream stream_items << reinterpret_cast<int> (item); // from stream stream_items >> i; item = reinterpret_cast<QTreeWidgetItem *> (i);To copy to clipboard, switch view to plain text mode
Bookmarks