Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
rimen last edited by
Is this right, after calling slot "QtreeWidget::clear()":http://developer.qt.nokia.com/doc/qt-4.8/qtreewidget.html#clear method "QTreeView::rowsAboutToBeRemoved":http://developer.qt.nokia.com/doc/qt-4.8/qtreeview.html#rowsAboutToBeRemoved must be called? I redefine rowsAboutToBeRemoved in my subclass to remove independent information, but it does not work after calling clear. Why so, after calling "QTreeWidgetItem::takeChild":http://developer.qt.nokia.com/doc/qt-4.8/qtreewidgetitem.html#takeChild and "QTreeWidgetItem::removeChild":http://developer.qt.nokia.com/doc/qt-4.8/qtreewidgetitem.html#removeChild it's work fine.
giesbert last edited by
No, that is wrong.
clear() deletes all item in the treewidget and also all rows and columns.
goetz last edited by
in case of QTreeWidget::clear() the underlying model calls beginResetModel() and endResetModel().
andre last edited by
Why did you redefine rowsAboutToBeRemoved ? You are supposed to call that method, not reimplement it. It is not even virtual!