Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTreeView - update parent item
folibis last edited by
I have a tree (QTreeView) in my program.
It looks like QtDesigner property editor when parent item text contains text from children, for example
- Point: (100,200)
- x: 100
- y: 200
so, I need update parent when children's text changed. How can I do that?
poorBob last edited by
welcome to Qt forum :).
Do You store Yours internalc data in some some parent-children structure? If yes, You should update first this model and then emit signal "QAbstractItemModel::dataChanged(...)":http://qt-project.org/doc/qt-5.0/qtcore/qabstractitemmodel.html#dataChanged Then Your parent will be updated.
If not, please give some more details about implmentation details,