QTreeView/QFileSystemModel to show directory structure



  • I made a treeView/QFileSystemModel to show directory structure.
    When I set root index as following,
    QTreeView *treeView = new QTreeView(this);
    treeView->setRootIndex(treeView->model()->index(-1,-1));
    it show only drive letters as you can see the left hand side of this picture
    How can I show the directory structure like the right hand side of picture?


  • Moderators

    @samdol
    same answer since you asked exactly this question the last time 3 months ago.
    You even copied the same text and picture... no need to double post. If you still have a question use the old thread.

    CLOSING


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.