[PyQt] loadUi import error QtWebkit instead QtWebEngine

Justus Rischke justusrischke at outlook.de
Wed Jan 11 12:30:50 GMT 2017


Hello,

i think i have found a problem regarding the new  QtWebEngineWidget and the loadUi function of uic.
I am designing my GUIs using Qt5 Designer. Currently i want to use a QWebView widget.
The problem occurs, when i use the loadUi function like "self.ui = loadUi("G.ui")" I get the following error:

Traceback (most recent call last):
  File "/home/gui.py", line 65, in <module>
    g = gui()
  File "/home/gui.py", line 24, in __init__
    self.ui = loadUi("G.ui")
  File "/usr/local/lib/python3.5/dist-packages/PyQt5/uic/__init__.py", line 226, in loadUi
    return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)
  File "/usr/local/lib/python3.5/dist-packages/PyQt5/uic/Loader/loader.py", line 72, in loadUi
    return self.parse(filename, resource_suffix, basedir)
  .......
  File "/usr/local/lib/python3.5/dist-packages/PyQt5/uic/objcreator.py", line 100, in createQObject
    factory = self.findQObjectType(classname)
  File "/usr/local/lib/python3.5/dist-packages/PyQt5/uic/objcreator.py", line 125, in findQObjectType
    w = module.search(classname)
  File "/usr/local/lib/python3.5/dist-packages/PyQt5/uic/Loader/qobjectcreator.py", line 69, in search
    self._module = __import__(self._moduleName, {}, {}, self._classes)
ImportError: No module named 'PyQt5.QtWebKitWidgets'

Since the QtWebKit was replace with QtWebEngine it cannot find the module.
My question is, if this could be a result of this Replacement?
Thank you and with

Best regards,
Justus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170111/54db453c/attachment.html>


More information about the PyQt mailing list