[PyQt] Errors about QWebEngineView

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


Hi,

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
/usr/local/lib/python3.5/dist-packages/PyQt5/Qt/libexec/qtwebengine_locales/,
the program works. (Though it still output some warnings.)

See also:
https://gist.github.com/yuwen41200/b57f66b898f23c034afb796e842dbdf6

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

Thanks,
YW
-------------- 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