Important: Please read the Qt Code of Conduct -

QFileDialog on network drives

  • 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()
    ..., mappa.drives().at(mappa.drives().count()-1 ).absoluteFilePath()@

  • 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.

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

Log in to reply