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. QFileDialog on network drives
Qt 6.11 is out! See what's new in the release blog

QFileDialog on network drives

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

    User should select a network dir in a QFileDialog. How can I set the starting dir to WinXP's "Network places" or to my box's own windows share group?

    @QDir mappa;
    QString nwdir = QFileDialog::getExistingDirectory(this, tr(" Selecting remote directory "), mappa.absoluteFilePath("//"));@

    I also tried ...absoluteFilePath("////") and a lot others:)
    User CAN select network dir's, but he/she could save some clicks if not starting from last drive's root dir.

    @..., mappa.drives().at(0).absoluteFilePath()
    or
    ..., mappa.drives().at(mappa.drives().count()-1 ).absoluteFilePath()@

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Darryl DSouza
      wrote on last edited by
      #2

      As far as I know, you can not set the QFileDialog to operating system specific folders like 'My Computer' in windows. The same applies to QFileSystemModel as well.

      Darryl D'Souza

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Darryl DSouza
        wrote on last edited by
        #3

        Please post the answer as well if you get any:)

        Darryl D'Souza

        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