Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTreeView - update parent item
Qt 6.11 is out! See what's new in the release blog

QTreeView - update parent item

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    folibis
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      poorBob
      wrote on last edited by
      #2

      Hello,
      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,

      Robert

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved