Hello,
I use Qt4.3.1 Open Source edition for Windows 32 bits (under Windows XP Pro SP2).
My application has a small interface based upon a QTreeWidget (named "tree") that displays many QTreeWidgetItem *.
When the user clic an item, the signal itemSelectionChanged() is emited. I've got a SLOT linked to this signal, so that I can analyse the item that has been clicked.
So consider the following code as my SLOT block :
With the following code : no problem.
The QTreeWidget is correctly cleared.
Originally Posted by Qt Assistant
With the following code : no problem.
The QString contains the informations of the first column of the firts selected item on the QTreeWidget.
Qt Code:
{ }To copy to clipboard, switch view to plain text mode
Originally Posted by Qt Assistant
With the following code : problem.
The application crashes, like it generally happens with memory errors...
Qt Code:
{ tree->clear(); }To copy to clipboard, switch view to plain text mode
I don't really understand the problem, and I can't find any solution.
The API concerning QTreeWidget and QTreeWidgetItem manages lots of pointers, like the list returned by selectedItems(). Certainly should I get the selected items instead of pointers to the selected ones... But I can't achieve to do that.
May you help me, please ?
Bookmarks