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. Model-View and trees
Forum Updated to NodeBB v4.3 + New Features

Model-View and trees

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 195 Views
  • 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.
  • A Offline
    A Offline
    AndrzejB
    wrote on 25 Mar 2022, 03:19 last edited by AndrzejB
    #1

    While model for listvIew is clear (we have rows, each row has column) how create model for tree control? For example - how to put in model filesystem subdirectory? And two kinds : first - we want fill all nodes, second - lazy in the fly - we want read directory when tree node is expanding.

    Is https://doc.qt.io/qt-5/modelview.html is section 3.1 TreeView.

    J 1 Reply Last reply 25 Mar 2022, 08:13
    0
    • A AndrzejB
      25 Mar 2022, 03:19

      While model for listvIew is clear (we have rows, each row has column) how create model for tree control? For example - how to put in model filesystem subdirectory? And two kinds : first - we want fill all nodes, second - lazy in the fly - we want read directory when tree node is expanding.

      Is https://doc.qt.io/qt-5/modelview.html is section 3.1 TreeView.

      J Offline
      J Offline
      JonB
      wrote on 25 Mar 2022, 08:13 last edited by
      #2

      @AndrzejB
      Are you looking for QFileSystemModel + QTreeView? See https://doc.qt.io/qt-5/qfilesystemmodel.html#example-usage.

      1 Reply Last reply
      1

      1/2

      25 Mar 2022, 03:19

      • Login

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