Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Main Thread Is Blocked By Mouse Wheel When I Involved other ui process for QT 5.14.2
Forum Updated to NodeBB v4.3 + New Features

Main Thread Is Blocked By Mouse Wheel When I Involved other ui process for QT 5.14.2

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 307 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    even0421
    wrote on last edited by
    #1

    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!

    Axel SpoerlA 1 Reply Last reply
    0
    • E even0421

      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!

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @even0421
      Please provide a minimal, compilable reproducer.
      Please also note that Qt 5.14 is no longer supported.

      Software Engineer
      The Qt Company, Oslo

      E 1 Reply Last reply
      0
      • Axel SpoerlA Axel Spoerl

        @even0421
        Please provide a minimal, compilable reproducer.
        Please also note that Qt 5.14 is no longer supported.

        E Offline
        E Offline
        even0421
        wrote on last edited by even0421
        #3

        @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 SpoerlA 1 Reply Last reply
        0
        • E even0421

          @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 SpoerlA Offline
          Axel SpoerlA Offline
          Axel Spoerl
          Moderators
          wrote on last edited by
          #4

          @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.

          Software Engineer
          The Qt Company, Oslo

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved