[Qt-interest] bring a progressdialog in front of a qfiledialog
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Fri Oct 30 01:41:53 CET 2009
Please don’t reply to me directly
That said..
Just like I said in my email, you core needs some sort of event loop action to work.
Doing that, is easy, and is left for an exercise to the student.. Don’t let Michigan tech down.
Scott
-----Original Message-----
From: Yifei Li [mailto:yifli at mtu.edu]
Sent: Thursday, October 29, 2009 5:39 PM
To: Scott Aron Bloom
Subject: Re: [Qt-interest] bring a progressdialog in front of a qfiledialog
Thank you for the reply.
I provide more details here:
if( !file.isEmpty() )
{
QProgressDialog progress(...);
progress.setWindowFlags(Qt::WindowStaysOnTopHint);
progress.raise()
// read some big file
read_big_file(myBigFileObject, file);
// process myBigFileObject
progress.setValue(1)
myBigFileObject.process_step_1();
progress.setValue(2)
myBigFileObject.process_step_2();
// more steps
...
}
----- Original Message -----
From: "Scott Aron Bloom" <Scott.Bloom at sabgroup.com>
To: "Yifei Li" <yifli at mtu.edu>, "qt-interest" <qt-interest at trolltech.com>
Sent: Wednesday, October 28, 2009 2:47:20 PM GMT -05:00 US/Canada Eastern
Subject: RE: [Qt-interest] bring a progressdialog in front of a qfiledialog
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