hi, I'm trying to do this; but the dialog appear, progressBarTx is at 100%...why I can't see the increment? ProgressBar max value is 100 from designer....and -1 min. thanks
//mainform
progress->show();
....Write(f, progress);
progress->close();
void OB::Write(QTextStream& xstrm, myProgressDialog* prog) {
for (int i=0; i< 10000; i++) {
prog->progressTx();
}
}
void myProgressDialog::progressTx() {
progressBarTx->setProgress(progressBarTx->progress()+1); qApp->processEvents();
}
//mainform
progress->show();
....Write(f, progress);
progress->close();
void OB::Write(QTextStream& xstrm, myProgressDialog* prog) {
for (int i=0; i< 10000; i++) {
prog->progressTx();
}
}
void myProgressDialog::progressTx() {
progressBarTx->setProgress(progressBarTx->progress()+1); qApp->processEvents();
}
To copy to clipboard, switch view to plain text mode
Bookmarks