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. How to get to an unexpanded path's index in Treeview (with FileSystemModel) without expand the treeview?
Forum Updated to NodeBB v4.3 + New Features

How to get to an unexpanded path's index in Treeview (with FileSystemModel) without expand the treeview?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 182 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.
  • C Offline
    C Offline
    Crypuff
    wrote on last edited by
    #1

    I am using Pyqt to develop a server maintenance application.

    I use a CheckableFileSystemModel override the QFilesystemmodel as the local file modeI. It adds checkbox before the items in the treeview.

    Sometimes I want to use a list of paths to update the checkstatus of checkbox (and show them to the user). It does not work when the path has not been expanded. As QFilesystemmodel is a lazy model which means it will not walk the directory. This make me not able to update the CheckStatus of an unexpanded path, unless recursively expanding the treeview (which will make the GUI stuck for a long time).

    Is there any better way to get to an unexpanded path's index in Treeview (with FileSystemModel) without expand the treeview?Or to add node to treeview without expand it?

    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