[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Errors about QWebEngineView
From:       Yu-wen Pwu <ywpu () cs ! nctu ! edu ! tw>
Date:       2016-07-29 4:18:23
Message-ID: CABgP3D1ysBcj0-FPXYoazn=Ewe1kaKYiAQ85zEGp5MPfLF58pw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@riverbankcomputing.com>:

> On 27 Jul 2016, at 7:18 am, Yu-wen Pwu <ywpu@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@cs.nctu.edu.tw

[Attachment #5 (text/html)]

<div dir="ltr">Hi,<div><br></div><div>Sorry for my late \
reply.</div><div><br></div><div>After upgrading PyQt to version 5.7, this problem no \
longer occurs.</div><div>However, the  look&#39;n&#39;feel becomes \
strange.</div><div><br></div><div>I&#39;m using Ubuntu 16.04 LTS.<br><div \
class="gmail_extra">In PyQt 5.6, all Qt Widgets have native Ubuntu&#39;s \
look&#39;n&#39;feel.</div><div class="gmail_extra">But after  upgrading  to version \
5.7, their look&#39;n&#39;feel changed.</div><div class="gmail_extra"><br></div><div \
class="gmail_extra">For example, in PyQt 5.7 the file dialog becomes:</div><div \
class="gmail_extra"><a \
href="http://i.imgur.com/veYfvjX.png">http://i.imgur.com/veYfvjX.png</a><br></div><div \
class="gmail_extra">which is not the native look&#39;n&#39;feel in Ubuntu.</div><div \
class="gmail_extra"><br></div><div class="gmail_extra">The same problem also occurs \
on Ubuntu GNOME.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Any \
ideas?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for \
your help.</div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-27 \
16:32 GMT+08:00 Phil Thompson <span dir="ltr">&lt;<a \
href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 27 Jul 2016, at 7:18 am, \
Yu-wen Pwu &lt;<a href="mailto:ywpu@cs.nctu.edu.tw">ywpu@cs.nctu.edu.tw</a>&gt; \
wrote:<br> &gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m writing a program containing a QWebEngineView:<br>
&gt;<br>
&gt; import sys<br>
&gt; from PyQt5.QtWidgets import QApplication<br>
&gt; from PyQt5.QtWidgets import QMainWindow<br>
&gt; from PyQt5.QtWebEngineWidgets import QWebEngineView<br>
&gt; from PyQt5.QtCore import QUrl<br>
&gt; def main():<br>
&gt;        app = QApplication(sys.argv)<br>
&gt;        window = QMainWindow()<br>
&gt;        window.setWindowTitle(&#39;PyQt Demo&#39;)<br>
&gt;        window.setGeometry(320, 180, 960, 540)<br>
&gt;        view = QWebEngineView()<br>
&gt;        view.load(QUrl(&#39;<a href="http://leafletjs.com/&#39;" rel="noreferrer" \
target="_blank">http://leafletjs.com/&#39;</a>))<br> &gt;        \
window.setCentralWidget(view)<br> &gt;        window.show()<br>
&gt;        sys.exit(app.exec_())<br>
&gt; if __name__ == &#39;__main__&#39;:<br>
&gt;        main()<br>
&gt;<br>
&gt; 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.)<br> &gt;<br>
&gt; See also: <a href="https://gist.github.com/yuwen41200/b57f66b898f23c034afb796e842dbdf6" \
rel="noreferrer" target="_blank">https://gist.github.com/yuwen41200/b57f66b898f23c034afb796e842dbdf6</a><br>
 &gt;<br>
&gt; I&#39;m using PyQt5==5.6. Is it a bug in PyQt or other problems in my \
system?<br> <br>
</span>Try PyQt v5.7.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
Phil</font></span></blockquote></div><br><div>--<br></div><div \
class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr">Yu-wen Pwu (蒲郁文), Union Liaison<br>Division of \
Public Relations, NCTU Computer Science Students&#39; Union, Taiwan<br>Website:  <a \
href="http://ywpu.me/" target="_blank">http://ywpu.me/</a>    Email: <a \
href="mailto:ywpu@cs.nctu.edu.tw" \
target="_blank">ywpu@cs.nctu.edu.tw</a><br></div></div></div></div></div></div></div></div>
 </div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic