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

QFileDialog save mode illogical behavior on OS X

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.1.0 Beta 1
    • Fix Version/s: 5.1.0
    • Labels:
      None
    • Environment:
      OS X 10.6.8
    • Platform/s:
      macOS
    • Commits:
      3ac5499a9e2fe76e12f7b9adc9865bfdcb2d77aa

      Description

      Executing a QFileDialog in save mode, if selectFile has not been called, the line edit is filled with the directory name. This seems illogical, the user should be presented with an empty line edit.

      main.cpp
      #include <QApplication>
      #include <QFileDialog>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QFileDialog fileDialog(0,
                                 "Save project as",
                                 "/Applications",
                                 "application (*.app)");
      
          fileDialog.setAcceptMode(QFileDialog::AcceptSave);
          fileDialog.setFileMode(QFileDialog::AnyFile);
      
          return fileDialog.exec();
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            sgaist Samuel Gaist
            Reporter:
            sgaist Samuel Gaist
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes