hi, I'm trying using QProgress dialog but the problem is that the dialog appear, the operation is completed (I can see the result), and dialog is again opem and progress bar have to start again;why? thanks
//steps*100=6400; I choose a casual number (can it be ok?)
LongOperationTodo ();
myProgressDialog* progress = new myProgressDialog (steps*100, this, "progress", TRUE );
progress->setMinimumDuration(1);
for ( int i = 0; i < steps*100; i++ ) {
progress->setProgress( i );
qApp->processEvents();
if ( progress->wasCanceled() )
break;
}
progress->setProgress(steps);
//steps*100=6400; I choose a casual number (can it be ok?)
LongOperationTodo ();
myProgressDialog* progress = new myProgressDialog (steps*100, this, "progress", TRUE );
progress->setMinimumDuration(1);
for ( int i = 0; i < steps*100; i++ ) {
progress->setProgress( i );
qApp->processEvents();
if ( progress->wasCanceled() )
break;
}
progress->setProgress(steps);
To copy to clipboard, switch view to plain text mode
Bookmarks