1

I have installed PyQt5 for Python3. However while I can import various modules into Python I am finding that none of the WebEngine modules import (WebEngine, WebEngineWidgets, WebEngineCore). They dont appear to be there.

from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets, uic

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1366, 768)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.widget = QtWebEngineWidgets.QWebEngineView(Form)
        self.widget.setObjectName("widget")
        self.verticalLayout.addWidget(self.widget)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))

if __name__ == "__main__":
    import os, sys
    app = QtWidgets.QApplication(sys.argv)
    ui_path = os.path.join(os.path.dirname(__file__), "ui/browser.ui")
    window = uic.loadUi(ui_path)
    window.widget.load(QtCore.QUrl("http://192.168.2.128:5000/"))
    window.show()
    sys.exit(app.exec_())

Is there no support for the WebEngine modules of PyQt on the Raspberry Pi and if so then any other alternatives to solve this issue?

4
  • You need to clarify what you mean by "doesn't work", otherwise this kind of question just reeks of the XY problem.
    – goldilocks
    Commented Feb 22, 2018 at 14:54
  • Clarified as "do not import". Please remove from hold. Commented Feb 22, 2018 at 20:59
  • 1
    May I ask: wouldn't it be useful for others and increase your chance for a helpful answer if you post in detail what you have tried (your code, your command line input etc.) and the original error messages?
    – Fabian
    Commented Feb 22, 2018 at 21:30
  • Examples added as requested. Though this is not a case of needing code assistance. Its a question of pyqt capabilities versus what is known to be available in qt. Commented Feb 23, 2018 at 4:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.