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. Itemview (QFileSystemModel)
Qt 6.11 is out! See what's new in the release blog

Itemview (QFileSystemModel)

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k 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.
  • I Offline
    I Offline
    Immii
    wrote on last edited by
    #1

    hi there i want to customize the QFileDialog, actually I dont want few dir named "data-Production-Folders1" to be navigatable in the file dialog. So wahat i am doing is setting my own proxymodel on my file dialog using QFileDialog::setProxyModel().
    But I am not sure which virtual function to re implement for this, indeed i dont know how i can show the folder in filedialog ""data-Production-Folders1" but dont allow user to click on this and go inside this folder.

    can any one please help?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Reimplement the flags() method and make sure you don't return the Qt::ItemIsEnabled flag. You might even want to make sure that childCount() returns 0 and hasChildren() returns false for this directory so the user can't even open the item.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Immii
        wrote on last edited by
        #3

        Thanx Andre: I am after your suggestion now :)

        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