Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to make QTreeView/QListView display specific folders?
QtWS25 Last Chance

How to make QTreeView/QListView display specific folders?

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 2.1k 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.
  • JackkkkkJ Offline
    JackkkkkJ Offline
    Jackkkkk
    wrote on last edited by
    #1

    i want to make a custom file manager that just shows specific folders.
    like this screenshot: only normal folders are displayed in the treeView, and only special folders ending with .asset (or ANY folder with a specific name such as beginning with an underscore "_folder9") are diaplayed in the listView.
    alt text

    filtering in QTreeView/QListView? or filtering in QFileSystemModel? QSortFilterProxyModel? even customize a QAbstractItemModel? which is the best solution? AT LEAST, it works!

    1 Reply Last reply
    0
    • JackkkkkJ Offline
      JackkkkkJ Offline
      Jackkkkk
      wrote on last edited by
      #2

      @denni-0 suppose i read file list in pure python, but how do i pass the data to QTreeView/QListView??

      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