Main Thread Is Blocked By Mouse Wheel When I Involved other ui process for QT 5.14.2
-
My application use microsoft webview2 to show webpage, but I found when I use mouse wheel on webview plugin my main thread is blocked so that my application ui is lag.
I also try use createWindowcontainer to create a widget using other process(like notepad), it's same to the webview, is it a bug in QT or I use wrong config?
Please help me, thanks! -
My application use microsoft webview2 to show webpage, but I found when I use mouse wheel on webview plugin my main thread is blocked so that my application ui is lag.
I also try use createWindowcontainer to create a widget using other process(like notepad), it's same to the webview, is it a bug in QT or I use wrong config?
Please help me, thanks!@even0421
Please provide a minimal, compilable reproducer.
Please also note that Qt 5.14 is no longer supported. -
@even0421
Please provide a minimal, compilable reproducer.
Please also note that Qt 5.14 is no longer supported.@Axel-Spoerl Thanks for replying! I just wrote a simple example:
QWindow * window = QWindow::fromWinId(5310800); if (window) { window->setFlags(window->flags() | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowDoesNotAcceptFocus); / QWidget * widget = QWidget::createWindowContainer(window, this, Qt::Widget); widget->resize(300,300); layout()->addWidget(widget); } auto m_timer = new QTimer(); m_timer->setInterval(40); m_timer->setTimerType(Qt::TimerType::PreciseTimer); connect(m_timer, &QTimer::timeout, this, [this]() { auto currentTime = QDateTime::currentMSecsSinceEpoch(); if (m_lastTime != 0) { qDebug() << currentTime - m_lastTime; } m_lastTime = currentTime; }); m_timer->start();when I scroll on window which Hwnd is "5310800"(any program is ok, like calculator), the main thread of my application is blocked, because there is no print of interval in timeout slot.
-
@Axel-Spoerl Thanks for replying! I just wrote a simple example:
QWindow * window = QWindow::fromWinId(5310800); if (window) { window->setFlags(window->flags() | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowDoesNotAcceptFocus); / QWidget * widget = QWidget::createWindowContainer(window, this, Qt::Widget); widget->resize(300,300); layout()->addWidget(widget); } auto m_timer = new QTimer(); m_timer->setInterval(40); m_timer->setTimerType(Qt::TimerType::PreciseTimer); connect(m_timer, &QTimer::timeout, this, [this]() { auto currentTime = QDateTime::currentMSecsSinceEpoch(); if (m_lastTime != 0) { qDebug() << currentTime - m_lastTime; } m_lastTime = currentTime; }); m_timer->start();when I scroll on window which Hwnd is "5310800"(any program is ok, like calculator), the main thread of my application is blocked, because there is no print of interval in timeout slot.
@even0421
I can’t reproduce that with Qt 6.5 on openSuSE Linux.
I haven’t tried on 5.14 and I won’t do that.
Suggest you upgrade to a supported Qt version and try again.