Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Tree model Table view
Qt 6.11 is out! See what's new in the release blog

Tree model Table view

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 1.9k 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.
  • E Offline
    E Offline
    error09
    wrote on last edited by
    #1

    Hi,

    QListView offers function setRootIndex to move between nodes, if is way to use something similar in qml table view ?

    1 Reply Last reply
    0
    • O Offline
      O Offline
      onek24
      wrote on last edited by
      #2

      It doesn't look like TreeView has got a function for that. But you could access its Children and move them to another Model or you'll have to create your model in Cpp with a function like setRootIndex and pass it to qml.

      For further information please read:
      "QtQuick Model from Cpp":https://qt-project.org/doc/qt-5.1/qtquick/qtquick-modelviewsdata-cppmodels.html

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jens
        wrote on last edited by
        #3

        Not sure exactly what your use case it but it sounds a bit similar to this: https://codereview.qt-project.org/#change,49564

        1 Reply Last reply
        0
        • E Offline
          E Offline
          error09
          wrote on last edited by
          #4

          Thanks, Jens i'm looking something like that.
          I want to you tree model with list view in qml.

          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