使用Qt C ++ QWebView导致GUI运行缓慢。 [英] Using Qt C++ QWebView causes the GUI to run slowly.

查看:320
本文介绍了使用Qt C ++ QWebView导致GUI运行缓慢。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当通过QWebView加载页面时,我注意到程序的其他元素开始运行缓慢,特别是GUI。

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?

推荐答案

我不能说在使用<$ c时,我的用户界面的其他部分$ c> QWebView ,即使在相当弱的SBCs。我想知道是否还有其他事情正在减缓你的下降。

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?

可以访问设置对象( QWebSettings )为您的 QWebView 使用 QWebView :: settings()。我建议禁用JS开始( QWebSettings :: setAttribute(JavascriptEnabled,false)),只是为了看看你是否被任何脚本您尝试显示的页面。

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.

这篇关于使用Qt C ++ QWebView导致GUI运行缓慢。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆