【python】ImportError: cannot import name 'QWebView'

报错原因:
WebEngine和WebKit混合在一起使用
解决方法:
下面两种写法选其中一种写法。
WebEngine:
from PyQt5.QtWebEngineWidgets import QWebEnginePage
from PyQt5.QtWebEngineWidgets import QWebEngineView
WebKit:
from PyQt5.QtWebKitWidgets import QWebPage
from PyQt5.QtWebKitWidgets import QWebView

参考来自:

https://stackoverflow.com/questions/48848061/python-pyqt5-cannot-import-name-qwebview

posted on 2018-08-24 08:22  芽衣  阅读(2863)  评论(0编辑  收藏  举报

导航