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. libVlc + qWebEngineView block main ui thread
Forum Updated to NodeBB v4.3 + New Features

libVlc + qWebEngineView block main ui thread

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 330 Views
  • 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.
  • L Offline
    L Offline
    liusz
    wrote on last edited by
    #1

    Hi,

    I put a libvlc widget, a qwebengineview and a label within one widget, and start a thread to update label text with current date time every 500ms. I found that the label text was not updated, but if I remove the qwebengineview, everything is ok.

    Any help will be appreciated.

    jsulmJ 1 Reply Last reply
    0
    • L liusz

      Hi,

      I put a libvlc widget, a qwebengineview and a label within one widget, and start a thread to update label text with current date time every 500ms. I found that the label text was not updated, but if I remove the qwebengineview, everything is ok.

      Any help will be appreciated.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @liusz said in libVlc + qWebEngineView block main ui thread:

      and start a thread to update label text with current date time every 500ms

      There is no need for a thread for such a use case, use QTimer instead - it is asynchronous just like most of Qt

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply
      0
      • jsulmJ jsulm

        @liusz said in libVlc + qWebEngineView block main ui thread:

        and start a thread to update label text with current date time every 500ms

        There is no need for a thread for such a use case, use QTimer instead - it is asynchronous just like most of Qt

        L Offline
        L Offline
        liusz
        wrote on last edited by
        #3

        @jsulm Thank you for your reply.
        I didn't make it clear. I did use QTimer to update the label. I used QTimer to update the text of the label just to see if the main thread of the interface was blocked. I found that as long as I put QWebEnginView on the interface, the main thread would be affected.

        jsulmJ 1 Reply Last reply
        0
        • L liusz

          @jsulm Thank you for your reply.
          I didn't make it clear. I did use QTimer to update the label. I used QTimer to update the text of the label just to see if the main thread of the interface was blocked. I found that as long as I put QWebEnginView on the interface, the main thread would be affected.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @liusz Without further code/explanation only guessing is possible...

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 1 Reply Last reply
          0
          • jsulmJ jsulm

            @liusz Without further code/explanation only guessing is possible...

            L Offline
            L Offline
            liusz
            wrote on last edited by
            #5

            @jsulm
            Hi,
            I uploaded a code that can reproduce this problem, Below is the download link for the code:
            https://drive.google.com/file/d/1cvgUQThXoCUkt8UHIrm71rAzn-i1ErYA/view?usp=sharingrf

            Could you please take a look at what's wrong with the code? Thank you.

            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