[Development] QtWidgets Item / Model / View: tree model examples
Laszlo Papp
lpapp at kde.org
Tue Nov 21 16:31:02 CET 2023
Hi,
The tree model examples seem to invent a custom tree item.
Simple:
https://doc.qt.io/qt-6/qtwidgets-itemviews-simpletreemodel-example.html
Edit:
https://doc.qt.io/qt-6/qtwidgets-itemviews-editabletreemodel-example.html
at
https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/itemviews/simpletreemodel/treeitem.h?h=6.6
and
https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/itemviews/editabletreemodel/treeitem.h?h=6.6
---
Long time ago, I based my projects on these examples, inventing (copying
and pasting) these tree items.
I wonder whether these examples could instead propagate the use of:
1. QTreeWidgetItem?
2. QStandardItem?
It seems that e.g. the QTreeWidgetItem is nearly the same as the Tree Item
invented in those examples. So, why reinvent?
Do you think that the tree item still has a good use case to exist in those
examples?
If yes, what is it?
If not, could we start propagating QTreeWidgetItem or QStandardItem in
those examples instead to avoid reinventing?
Thank you in advance.
Kind regards,
László
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20231121/5643e6a6/attachment.htm>
More information about the Development
mailing list