You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

导入QWebEngineView后QApplication偶发冻结问题求助

导入QWebEngineView后QApplication初始化偶发冻结

运行以下代码时,程序仅输出0后就无后续内容,多次尝试会出现挂起情况:

from PyQt6.QtWidgets import QApplication
from PyQt6.QtWebEngineWidgets import QWebEngineView
import sys

print("0")
app = QApplication(sys.argv)
print("1")

移除from PyQt6.QtWebEngineWidgets import QWebEngineView这一行后,程序能稳定输出0和1;但重新添加该行后,QApplication在初始化阶段就会偶发冻结,导致程序无法继续执行。

环境信息

  • 系统:Windows 11
  • 版本:PyQt5 5.15.9(对应Qt 5.15.2)、PyQt6 6.4.1(对应Qt 6.4.2)

内容的提问来源于stack exchange,提问作者Omer ANAR

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.01 22:55:16