Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] QFileDialog 5 second delay after Open/Save/Close
Forum Updated to NodeBB v4.3 + New Features

[solved] QFileDialog 5 second delay after Open/Save/Close

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.3k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeroen3
    wrote on last edited by Jeroen3
    #1

    I'm working with QFIleDialog, but somehow dialog.exec() hangs the application for ~5 seconds on any action exiting the dialog.

    I'm using Windows 7x64, and it happens in some other applications for the first time. Qt has it always.
    It also happens on some other workstations around. Which makes it even more random.

    Any clues? Since using "Windows" and "Hangs" in google does not result in very useful results.

    Minimal example: a new Qt 5.4.1 project with 1 button in QMainWindow

    void MainWindow::on_pushButton_clicked()
    {
        QStringList filters;
        filters << "Loadbank Sequence File (*.lsf)";
        filters << "All files (*)";
        QFileDialog dialog(this, "Select file", "/", "");
        dialog.setNameFilters(filters);
        dialog.setFileMode(QFileDialog::ExistingFile);
        dialog.exec();
        qDebug() << "done";
    }
    

    I've used procmon to see what the actions are:

    • Thread Exit (from the dialog I suppose_
    • Accessing "Tablet PC" registry keys.
    • Close file:C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d
    • Accessing the file requested by the dialog, this is after dialog.exe().
    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by Chris Kawa
        #3

        It's hard to pinpoint such problems but I remember vaguely something similar happened to me few years back.
        Back then the issue turned out to be multiple network drives (some of them unreachable) mapped in the user's computer taking ages to resolve or timeout. Apart from obviously suggesting to remove the unreachable network locations one thing I did was initially point the dialog to a "more useful" location than "/", such as QStandardPaths::DocumentsLocation, which avoided the problem altogether.

        The issue might be different here, like some 3rd party shell extensions going rogue, but a solution might be the same. Try pointing the dialog to a "safer" location and see if that helps.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jeroen3
          wrote on last edited by
          #4

          I've played with all the extensions, turn on, off. uninstall antivirus and such.
          The problem seemed gone when a extension was turned off. But when you turn any different extension for explorer, Like dropbox, greenshop, owncloud, copy, cloud station, autohotkey scripts. The problem returned.

          At last I played around with the Windows Performance Recorder and Analyzer. Then it became apparent that there was a large number of network requests made.

          I removed Network Folders (not drives, folders) from "My Computer", and the problems seems gone. Not solved, because if I create the locations again, it returns.

          Workaround: create a batch script to "mount" network drives only they are actually available.
          Windows still keeps to amaze me. "Basic" features existing for decades still have these simple problems.

          mrjjM 2 Replies Last reply
          0
          • J Jeroen3

            I've played with all the extensions, turn on, off. uninstall antivirus and such.
            The problem seemed gone when a extension was turned off. But when you turn any different extension for explorer, Like dropbox, greenshop, owncloud, copy, cloud station, autohotkey scripts. The problem returned.

            At last I played around with the Windows Performance Recorder and Analyzer. Then it became apparent that there was a large number of network requests made.

            I removed Network Folders (not drives, folders) from "My Computer", and the problems seems gone. Not solved, because if I create the locations again, it returns.

            Workaround: create a batch script to "mount" network drives only they are actually available.
            Windows still keeps to amaze me. "Basic" features existing for decades still have these simple problems.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Jeroen3

            yep,

            And to my surprise, one can have 15 overlay icons. 11 for free use.
            So when trying to use my sub version, it cannot show status of files as dropbox and such
            program used all my overlay icons :)

            To be fair, win 8 does handle stale net location better than win 7.

            1 Reply Last reply
            0
            • J Jeroen3

              I've played with all the extensions, turn on, off. uninstall antivirus and such.
              The problem seemed gone when a extension was turned off. But when you turn any different extension for explorer, Like dropbox, greenshop, owncloud, copy, cloud station, autohotkey scripts. The problem returned.

              At last I played around with the Windows Performance Recorder and Analyzer. Then it became apparent that there was a large number of network requests made.

              I removed Network Folders (not drives, folders) from "My Computer", and the problems seems gone. Not solved, because if I create the locations again, it returns.

              Workaround: create a batch script to "mount" network drives only they are actually available.
              Windows still keeps to amaze me. "Basic" features existing for decades still have these simple problems.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Jeroen3

              Did you ever try the DontUseCustomDirectoryIcons option to see if that would speed it up ?

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved