[Qt-creator] QProgressDialog
Eike Ziller
eike.ziller at nokia.com
Mon Feb 2 17:04:04 CET 2009
Hi,
On Feb 2, 2009, at 4:49 PM, ext Paulo Jnkml wrote:
> Hi,
>
> consider the following code:
>
>
> QProgressDialog d("Progress", "Cancel", 0, 100);
>
> d.show(); //Calling this here only shows the bar, no button or label.
>
> //d.exec(); Can't call this here because the next step will never be
> executed. (Unless there's a non blocking call to exec)
>
> myFunctionWithCalback( boost::bind(&QProgressDialog::setValue, &pd,
> _1) ); //look look, boost free pub
>
> //d.exec(); Won't be of much value here.
>
>
>
> - How can I make this dialog show itself completly without calling
> the exec()?
>
> - Is it normal for d.show not to show the cancel button and the
> label text? (The dialog does get resized by the label length though.)
>
> Thank you.
> PS: If there's a better place to pose such a question, could anyone
> tell me please =D
Yes, the qt-interest at trolltech.com mailing list would be better suited.
Nevertheless, the following code does show the cancel button+label for
me (I'm at a Mac though):
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QProgressDialog dialog("Progress", "Cancel", 0, 1000);
dialog.show();
for (int i = 0; i <= 1000; ++i) {
dialog.setValue(i);
}
}
--
Eike Ziller
Software Engineer
Nokia, Qt Software
Phone +49 (0)30 6392 3255
Fax +49 (0)30 6392 3256
E-mail eike.ziller at nokia.com
More information about the Qt-creator-old
mailing list