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 data change
Qt 6.11 is out! See what's new in the release blog

QTreeView data change

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 1.3k 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.
  • S Offline
    S Offline
    SpanishJohn
    wrote on last edited by
    #1

    Hi.

    How do I refresh my tree view at a specific point?

    For example, say I have 4 children of the main root. Each child has a further 4 children etc. How do I refresh child 1 off the root without having to reset the tree.

    Thx SJ

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SpanishJohn
      wrote on last edited by
      #2

      Me again. Just to clarify. I do not want to add or remove data to the tree. I have tries dataChanged (emit dataChanged(1)) but it caused an exception. I also want the tree to keep its 'shape' during the refresh hence the reason why I cant use the reset method

      SJ

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SpanishJohn
        wrote on last edited by
        #3

        Solved. emiting dataChanged does indeed work. It was a bug in my model. Regards, SJ

        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