Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6241

It isn't possible to manually set QFileDialog as QFileDialog::getExistingDirectory

    XMLWordPrintable

Details

    • 5c2d319ce56fa7914afe52ae13f1a24c03608629

    Description

      While tweaking an instance of QFileDialog on a pet project of mine I've noticed that although QFileDialog::getExistingDirectory() works as expected, the following code generates a regular file dialog, which does not filter out regular files:

      <code>
      QFileDialog fd(this, tr("Select base directory"), base_dir);
      bool validatePage();
      fd.setFileMode(QFileDialog::Directory);
      fd.setOptions(QFileDialog::ShowDirsOnly);
      fd.setViewMode(QFileDialog::List);
      fd.exec();
      </code>

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            menard Alexis Menard (closed Nokia identity) (Inactive)
            rui maciel Rui Maciel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes