强制QWebView在单独的线程中下载网页内容?

发布于 2024-09-27 14:10:46 字数 39 浏览 0 评论 0原文

我如何强制 QWebView 在单独的线程中下载网页和相关内容?

How can i force QWebView into downloading the webpage and related content in a separate thread?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

抱猫软卧 2024-10-04 14:10:46

你不能轻易。
您可以实现自己的 QNetworkAccessManager(请参阅 createRequest()),将工作卸载到另一个线程中的 QNetworkAccessManager。

你的具体问题是什么?
也许可以用不同的方式解决,或者可以报告 Qt 的错误?

You cannot easily.
You could implement your own QNetworkAccessManager (see createRequest()) that offloads the work to a QNetworkAccessManager in another thread.

What is your exact problem?
Maybe it can be solved differently or a bug to Qt can be reported?

浪荡不羁 2024-10-04 14:10:46

现在这是默认行为,因此您可以放松并观看:)
请参阅Qt Earth Team Mix 2011 年 2 月< /a> 和 QNetworkAccessManager 的线程支持

That's now the default behaviour so you can just relax and watch :)
See Qt Earth Team Mix Feb 2011 and Threading support for QNetworkAccessManager

故事灯 2024-10-04 14:10:46

为什么 QWebView 在主线程加载内容时会出现问题?我的意思是,如果你这样做,主线程根本不会被锁定。

您可以有一个隐藏的 QWebView 加载内容,并在完成后显示它。

也许您应该多描述一下您的问题/想法,以帮助我们帮助您。

Why do you see a problem in having a QWebView loading content at the main thread? I mean, the main thread won't be locked at all if you do this.

You can have a hidden QWebView loading content and just when it has finished you show it.

Maybe you should describe your problem/idea a little bit more to help us help u.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文