- attempt to fix the problem with non-working setTooltip()
This commit is contained in:
parent
9ff378d5e0
commit
37840dfdb1
@ -299,6 +299,7 @@ static void dispatchToMainThread(std::function<void()> callback)
|
|||||||
QTimer* timer = new QTimer();
|
QTimer* timer = new QTimer();
|
||||||
timer->moveToThread(qApp->thread());
|
timer->moveToThread(qApp->thread());
|
||||||
timer->setSingleShot(true);
|
timer->setSingleShot(true);
|
||||||
|
timer->setInterval(std::chrono::milliseconds(500));
|
||||||
QObject::connect(timer, &QTimer::timeout, [=]()
|
QObject::connect(timer, &QTimer::timeout, [=]()
|
||||||
{
|
{
|
||||||
// main thread
|
// main thread
|
||||||
@ -345,7 +346,6 @@ void MainWindow::shiftTo(AppState newState)
|
|||||||
dispatchToMainThread([this](){
|
dispatchToMainThread([this](){
|
||||||
onUpdateUI();
|
onUpdateUI();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onUpdateUI()
|
void MainWindow::onUpdateUI()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user