diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index 9a66fff..c3cadd0 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -299,6 +299,7 @@ static void dispatchToMainThread(std::function callback) QTimer* timer = new QTimer(); timer->moveToThread(qApp->thread()); timer->setSingleShot(true); + timer->setInterval(std::chrono::milliseconds(500)); QObject::connect(timer, &QTimer::timeout, [=]() { // main thread @@ -345,7 +346,6 @@ void MainWindow::shiftTo(AppState newState) dispatchToMainThread([this](){ onUpdateUI(); }); - } void MainWindow::onUpdateUI()