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 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.

    JonBJ 1 Reply Last reply
    0
    • A AndrzejB

      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.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on 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

      • Login

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