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

QFileDialog save mode illogical behavior on OS X

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.1.0
    • 5.1.0 Beta 1
    • None
    • OS X 10.6.8
    • macOS
    • 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

            sgaist Samuel Gaist
            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