Set progress bar timer to 500ms.

Yield thread to give worker thread its share of CPU time.
This commit is contained in:
Gerhard Hoffmann 2023-08-11 11:05:33 +02:00
parent 9eb458c4c5
commit ed6df98653

View File

@ -87,7 +87,7 @@ void MainWindow::customEvent(QEvent *event) {
m_progressValue = progress;
ui->updateProgress->setValue(progress/10);
QApplication::postEvent(this, new ProgressEvent(this, progress+10));
QThread::msleep(100);
QThread::msleep(500);
}
}
}
@ -110,6 +110,8 @@ void MainWindow::customEvent(QEvent *event) {
qCritical() << "!!! UNKNOWN SENDER !!!";
}
}
QThread::yieldCurrentThread();
}
void MainWindow::onStopStartTimer() {