Planned maintenance: From Sunday 8th December 10:00 CET there will be changes to try and solve the caching issues that have been experienced. If anyone has a problem connecting after this period then please PM @AndyS or any of the moderators.

FileDialog causes long startup hang



  • This has been a known issue: see https://bugreports.qt.io/browse/QTBUG-46477. 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?