PDA

View Full Version : Delete items retrieved from QTreeWidget.takeItem



bruccutler
22nd March 2007, 19:33
Hello again,
Somewhere I read that you need to delete the QTreeWidgetItems that are returned from the QTreeWidget.takeChildren (or takeChild).

Is that true?
- Bruce

jpn
22nd March 2007, 19:53
Somewhere I read that you need to delete the QTreeWidgetItems that are returned from the QTreeWidget.takeChildren (or takeChild).

Is that true?

Hi

I can't find it from the docs either. But that's true. QTreeWidget is no more responsible for items "taken" out of it so you must delete them by hand.

bruccutler
22nd March 2007, 22:29
So, do I use a Qt call to delete the object? If so, which one?
- BRC

wysota
22nd March 2007, 23:24
No, you use a C++ call called "delete" :)