PDA

View Full Version : QFileDialog::getOpenFileName closing very late.



newtolinux
26th December 2010, 15:53
Hi..
I am using "QFileDialog::getOpenFileName()" in mycode. The thing is if i select a smaller file(in size), filedialoge closing immedietly. If i select a large movie file(morethan ~500MB), dialoge taking long time to close itself. Ofcourse it returning the path of that file, but why this delay in closing happens? Can i avoid that?

franz
27th December 2010, 08:25
Which Qt version, OS or environment? Do you use native dialogs? If not, do you see the same behavior using the non-blocking approach?

newtolinux
27th December 2010, 09:16
hi..franz,
I am using Qt 4.7.0 (windows XP), an i am passing the flags(QFileDialog::DontUseNativeDialog | QFileDialog::DontResolveSymlinks) while creating filedialoge. sorry i dont know what "non-blocking approach" means?

franz
27th December 2010, 13:36
OK, you should try to see what happens when you don't use the static functions. Have a look at the Unpredictable Exec (http://labs.qt.nokia.com/2010/02/23/unpredictable-exec/) blog post for more info on the (better imo) alternatives.