[PyQt] Errors about QWebEngineView

Yu-wen Pwu ywpu at cs.nctu.edu.tw
Wed Jul 27 07:18:03 BST 2016


I'm writing a program containing a QWebEngineView:

import sys
> from PyQt5.QtWidgets import QApplication
> from PyQt5.QtWidgets import QMainWindow
> from PyQt5.QtWebEngineWidgets import QWebEngineView
> from PyQt5.QtCore import QUrl
> def main():
>     app = QApplication(sys.argv)
>     window = QMainWindow()
>     window.setWindowTitle('PyQt Demo')
>     window.setGeometry(320, 180, 960, 540)
>     view = QWebEngineView()
>     view.load(QUrl('http://leafletjs.com/'))
>     window.setCentralWidget(view)
>     window.show()
>     sys.exit(app.exec_())
> if __name__ == '__main__':
>     main()

But I get error messages telling me some files are missing. Finally, I find
that by copying everything under
/usr/local/lib/python3.5/dist-packages/PyQt5/Qt/resources/ to
/usr/local/lib/python3.5/dist-packages/PyQt5/Qt/libexec/ and
the program works. (Though it still output some warnings.)

See also:

I'm using PyQt5==5.6. Is it a bug in PyQt or other problems in my system?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160727/407886b6/attachment.html>

More information about the PyQt mailing list