[PyQt] Errors about QWebEngineView
Yu-wen Pwu
ywpu at cs.nctu.edu.tw
Fri Jul 29 05:18:23 BST 2016
Hi,
Sorry for my late reply.
After upgrading PyQt to version 5.7, this problem no longer occurs.
However, the look'n'feel becomes strange.
I'm using Ubuntu 16.04 LTS.
In PyQt 5.6, all Qt Widgets have native Ubuntu's look'n'feel.
But after upgrading to version 5.7, their look'n'feel changed.
For example, in PyQt 5.7 the file dialog becomes:
http://i.imgur.com/veYfvjX.png
which is not the native look'n'feel in Ubuntu.
The same problem also occurs on Ubuntu GNOME.
Any ideas?
Thanks for your help.
2016-07-27 16:32 GMT+08:00 Phil Thompson <phil at riverbankcomputing.com>:
> On 27 Jul 2016, at 7:18 am, Yu-wen Pwu <ywpu at cs.nctu.edu.tw> wrote:
> >
> > 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?
>
> Try PyQt v5.7.
>
> Phil
--
Yu-wen Pwu (蒲郁文), Union Liaison
Division of Public Relations, NCTU Computer Science Students' Union, Taiwan
Website: http://ywpu.me/ Email: ywpu at cs.nctu.edu.tw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160729/17212939/attachment-0001.html>
More information about the PyQt
mailing list