libVlc + qWebEngineView block main ui thread
-
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.
-
@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
-
@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. -
@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=sharingrfCould you please take a look at what's wrong with the code? Thank you.