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. Set relative path for QFileSystem Model
QtWS25 Last Chance

Set relative path for QFileSystem Model

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 282 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.
  • G Offline
    G Offline
    GCDX
    wrote on last edited by
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • G Offline
      G Offline
      GCDX
      wrote on last edited by
      #2

      tree->setRootIndex(model->index(QDir::currentPath()));

      I tried following this from the documentation but it doesn't work?

      jsulmJ 1 Reply Last reply
      0
      • G GCDX

        tree->setRootIndex(model->index(QDir::currentPath()));

        I tried following this from the documentation but it doesn't work?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @GCDX What does

        model->index(QDir::currentPath())
        

        return?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        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