<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hi,<div><br></div><div>I'm writing a program containing a <font face="monospace, monospace">QWebEngineView</font>:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace, monospace">import sys<br></font><font face="monospace, monospace">from PyQt5.QtWidgets import QApplication<br></font><font face="monospace, monospace">from PyQt5.QtWidgets import QMainWindow<br></font><font face="monospace, monospace">from PyQt5.QtWebEngineWidgets import QWebEngineView<br></font><font face="monospace, monospace">from PyQt5.QtCore import QUrl</font><font face="monospace, monospace"><br></font><font face="monospace, monospace">def main():<br></font><font face="monospace, monospace"> app = QApplication(sys.argv)</font><font face="monospace, monospace"><br></font><font face="monospace, monospace"> window = QMainWindow()<br></font><font face="monospace, monospace"> window.setWindowTitle('PyQt Demo')<br></font><font face="monospace, monospace"> window.setGeometry(320, 180, 960, 540)</font><font face="monospace, monospace"><br></font><font face="monospace, monospace"> view = QWebEngineView()<br></font><font face="monospace, monospace"> view.load(QUrl('<a href="http://leafletjs.com/'" target="_blank">http://leafletjs.com/'</a>))</font><font face="monospace, monospace"><br></font><font face="monospace, monospace"> window.setCentralWidget(view)<br></font><font face="monospace, monospace"> window.show()</font><font face="monospace, monospace"><br></font><font face="monospace, monospace"> sys.exit(app.exec_())</font><font face="monospace, monospace"><br></font><font face="monospace, monospace">if __name__ == '__main__':<br></font><font face="monospace, monospace"> main()</font></blockquote><div><div><br></div><div>But I get error messages telling me some files are missing. Finally, I find that by copying everything under <font face="monospace, monospace">/usr/local/lib/python3.5/dist-packages/PyQt5/Qt/resources/</font> to <font face="monospace, monospace">/usr/local/lib/python3.5/dist-packages/PyQt5/Qt/libexec/</font> and <font face="monospace, monospace">/usr/local/lib/python3.5/dist-packages/PyQt5/Qt/libexec/qtwebengine_locales/</font>, the program works. (Though it still output some warnings.)</div><div><br></div><div>See also: <a href="https://gist.github.com/yuwen41200/b57f66b898f23c034afb796e842dbdf6" target="_blank">https://gist.github.com/yuwen41200/b57f66b898f23c034afb796e842dbdf6</a></div><div><br></div><div>I'm using <font face="monospace, monospace">PyQt5==5.6</font>. Is it a bug in PyQt or other problems in my system?</div><div><br></div><div>Thanks,</div><div>YW</div><div><br></div></div></div></div>
</div>