Using Qt C++ QWebView causes the GUI to run slowly.
Asked Answered
K

2

3

When the page loads through QWebView I've noticed that other elements of the program are beginning to run slowly, specifically the GUI.

What is the best solution for addressing this problem?

Knotweed answered 5/11, 2011 at 22:13 Comment(0)
S
2

I can't say I've ever had any appreciable slowdown of the rest of a user interface when using QWebView, even on quite underpowered SBCs. I wonder if there's something else going on that's slowing you down.

Are you getting this problem with all pages you load, or just certain ones?

One idea: you can access the settings object (an instance of QWebSettings) for your QWebView using QWebView::settings(). I'd recommend disabling JS to start with (QWebSettings::setAttribute(JavascriptEnabled, false)), just to see if you're being slowed down by any scripts running behind the page you're trying to display.

Stepp answered 6/11, 2011 at 12:45 Comment(0)
T
1

I have the same issue, and it's related to having multiple QWebViews visible (in my case 2-3) and having JavaScript-based elements that are slow to render (such as Raphael elements or a ckeditor document). Since QWebKit must be run from the main thread, any slowdowns in rendering the web page will slow down the rest of the GUI user interaction. I'm currently not aware of any way to solve this. It's disappointing that QWebView cannot be put into another thread.

Tedious answered 29/1, 2016 at 22:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.