GetOpenFilename hangs forever given the dir of "D:\Downloads"
-
Hi, Does your debugger work at all? When debugging my OpenFile is slow and very time consuming! So define "hangs" and "forever" ;-)
Greetz -
So I think I figured it out. The D:\Downloads folder has a lot of files in it and QT has something that crawls it then responds on the UI thread with information. I believe the issue is somewhere in here.
The hang is for like 30 secs to a minute on my machine the first time I open the directory.
-
I've also noticed that native file dialog takes some time to open up on Windows for the first time. I believe this has to do with Windows/Explorer rather than Qt. Just my speculation, though.
-
This is true but it never takes 30 seconds to minutes. Furthermore if the open dialog is pointed towards a directory with just a few files this time is dramatically shorter meaning the dialog is pretty sensitive towards the number of entries in a directory.
-
Hmm, that line of reasoning certainly isn't bulletproof, but the file viewer's database backend is being filled by some sort of file scanning algorithm. If it was just the base window's implementation then I wouldn't expect that QT would run a background thread to scan the files. In any case, I am fairly certain (but not 100%) the problem lies in QT not the window's file viewer implementation.