Nominate our 2022 Qt Champions!

FileDialog causes long startup hang

  • This has been a known issue: see I think what I'm seeing is the same bug, but I'm not sure. When I added a FileDialog to my application, running on Win7 using Qt 5.12.2 (and now 5.13.0), it suddenly began hanging on startup, before the main window ever appeared. Once, I happened to leave it in that state, and was surprised when the window finally appeared after more than a minute, which prompted some Googling, which led to the above bug report. It seems to have something to do with there being drive letters mapped to network drives on machines that aren't online. However, the program sometimes starts quickly, even though I know there is at least one mapped drive that is offline.

    I don't see any way to deal with this situation. You can read my comment at the end of that bug report, about what I think the issues are. But I just need a workaround. How do I use a FileDialog in QML, to pop up the native Windows file dialog box, without any danger that it will do something that prevents the main window from appearing for minutes?