A question about QTreeWidget
-
[quote author="cincirin" date="1307082603"]This function make as it says ... remove widget from item. So if you did not set a widget in item, nothing have to remove. If you want to remove item from tree, just delete it.[/quote]
@
QTreeWidget treeWidget;
QTreeWidgetItem *pOneItem = new QTreeWidgetItem;
MyOwnWidget *pCustomWidget = new MyOwnWidget;
treeWidget.SetItemWidget(pOneItem, 0, pCustomeWidget)
treeWidget.RemoveItemWidget(pOneItem,0);
treeWidget.clear()//If I need to call those ?????If the clear and RemoveItemWidget function will release the memory automatically.
delete pCustomWidget;
delete pOneItem;
@ -
If you already call "clear":http://doc.qt.nokia.com/latest/qtreewidget.html#clear, you do not have to delete it. I'm not sure if you call "removeItemWidget":http://doc.qt.nokia.com/latest/qtreewidget.html#removeItemWidget, your pCustomWidget will be deleted.