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

Windows: Typing a file name to Widget-based QFileDialog search field without a suffix results an warning.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.2.1
    • None
    • Windows7
    • Related: cbf5aa625d1a41156880cccbe081e84fc0c1067e.(Turn off defaultNameFilterDisables(), stable, 14.3.2014, 5.3)

    Description

      Using tests\manual\dialogs:

      • Uncheck Use Native Dialogs (Use widget based file dialog)
      • Choose getOpenFileName, showModal or similar
      • Set a filter to a QFileDialog, for example *.txt.
      • Note that files not matching are grayed out (as opposed to Linux, where they don't show)
      • Start typing name of grayed-out file, select the file from completion
        The warning:
        File not found.
        Check the file name and try again.
        
        #include <QApplication>
        #include <QFileDialog>
        #include <QDir>
        #include <QDebug>
        
        int main(int argc, char *argv[])
        {
            QApplication app(argc, argv);
        
            QFileDialog *dialog = new QFileDialog();
            dialog->setDirectory(QDir::currentPath());
            qDebug()<<dialog->getOpenFileName(0, "Open File", QDir::currentPath(), "*.txt");
            return app.exec();
        }
        
        

      Attachments

        1. QTBUG-37302.png
          39 kB
          Shawn Rutledge
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes