[Qt-interest] bring a progressdialog in front of a qfiledialog
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Wed Oct 28 19:47:20 CET 2009
Yes I can help you with this... Will I ? that is the question...
The moment your QProgressDialog goes out of scope.. it will close.
So what is going on in your "...." is very important.
It needs to be some sort of event loop so it will stay in that area
until what ever you are doing is done
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Yifei Li
Sent: Wednesday, October 28, 2009 11:38 AM
To: qt-interest
Subject: [Qt-interest] bring a progressdialog in front of a qfiledialog
Hi all,
I want to show a progressdialog immediately after I hit 'Open'. I tried
BOTH modal and modaless qfiledialg, but still can't bring the
progressdialog to the front. The progressdialog only flashed after the
qfiledialog is closed.
Here is what I did:
file = QFileDialog::getOpenFileName(...);
if( !file.isEmpty() )
{
QProgressDialog progress(...);
progress.setWindowFlags(Qt::WindowStaysOnTopHint);
progress.raise()
....
}
Can anyone help me with this? Thanks
Yifei
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list