From 37840dfdb1e861150351b4d0faf675b88a68d35b Mon Sep 17 00:00:00 2001 From: Dmytro Bogovych Date: Sat, 13 May 2023 20:32:45 +0300 Subject: [PATCH] - attempt to fix the problem with non-working setTooltip() --- app/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()