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

QFileDialog with DontUseNativeDialog takes several minutes to show

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.2
    • GUI: Window management
    • None
    • Windows

    Description

      When using non-native QFileDialog, it will take a while before the dialog shows up.

       

      #include <QApplication>
      #include <QFileDialog>
      #include <windows.h>
      
      void MessageOutput( QtMsgType type, const QMessageLogContext &context, const QString &msg)
      {
          QString message = "[DEBUG] -- " + msg + "\n";
          OutputDebugString(message.toStdString().c_str());
      }
      
      int main( int argc, char* argv[] )
      {
          QApplication app(argc, argv);    
          qInstallMessageHandler(MessageOutput);    
      
          QFileDialog dlg;
          dlg.setOption( QFileDialog::DontUseNativeDialog );
          dlg.show();    
      
          return app.exec();
      } 

       

      It takes many minutes before the dialog actually shows up. 

      The console reports "[DEBUG] – SHGetFileInfo() timed out for C:\..." for all files and folders contained by the default folder where the dialog strats in. Every "timed out" message takes up to 10 seconds to come, so the more files and folders the path contains, the longer the dialog takes to show up.

      Attachments

        Activity

          People

            owolff Oliver Wolff
            jpo38 Jean Porcherot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: