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
Qt Code:
  1. //steps*100=6400; I choose a casual number (can it be ok?)
  2. LongOperationTodo ();
  3. myProgressDialog* progress = new myProgressDialog (steps*100, this, "progress", TRUE );
  4. progress->setMinimumDuration(1);
  5. for ( int i = 0; i < steps*100; i++ ) {
  6. progress->setProgress( i );
  7. qApp->processEvents();
  8. if ( progress->wasCanceled() )
  9. break;
  10. }
  11. progress->setProgress(steps);
To copy to clipboard, switch view to plain text mode