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

QFileDialog with native UI does not show the file name in the file name input field

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.0.2
    • 5.0.1
    • None
    • Windows 7 64 bit
    • bfd73eaba3000861037d03787f87d1f4dafefea8

    Description

      Hi

      When I use QFileDialog with native UI to save a file, the filename is not shown in the file name input field of the dialog. If I switch to non native dialog the file name is displayed correctly.

      Sample code:
      QFileDialog * fileDialog = new QFileDialog(this,"Test title",filePath,tr("HTML file (*.html)") );
      fileDialog ->setFileMode(QFileDialog::AnyFile);
      txQFileDialog->setOptions(QFileDialog::DontUseNativeDialog); //if this line is omitted then the file name
      //is not shown in the file name input field
      fileDialog ->setAcceptMode(QFileDialog::AcceptSave);
      fileDialog ->selectFile(fileNameWithoutPath);

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            marcus.fr Marcus Frenkel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes