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

List:       pykde
Subject:    Re: [PyQt] PyQt Digest, Vol 145, Issue 25
From:       Nick <napperley () gmail ! com>
Date:       2016-08-28 0:38:36
Message-ID: CAG_o7uNqJ=sjcitZDfy5y2mO+pK9Q=FSRptCXPZdJ7GQoYw6Yg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Got a partial solution that is reasonably workable. Use a custom style
(Clean Looks) and the Gtk 2 platform style library from Qt 5.6. Attached is
a compressed file containing the 2 style files. Works at least with Linux
Mint 17. Should work with Linux Mint 18, Ubuntu 14.04, and Ubuntu 16.04.

In order to improve styling in Linux with a PyQt 5.7 program place
*libqcleanlooksstyle.so* file in
*{your_venv_dir}/lib/python3.5/site-packages/PyQt5/Qt/plugins/styles*, and
place *libqgtk2.so* file in *{your_venv_dir}/*
*lib/python3.5/site-packages/PyQt5/Qt/plugins/platformthemes*. Also you
will need to set the *QT_QPA_PLATFORMTHEME* environment variable to *"gtk2"
*before running a PyQt 5.7 program, otherwise the platform style isn't
applied.

Not ideal but at least PyQt 5.7 programs are usable in Linux. One temporary
workaround depending on project requirements is to downgrade to PyQt 5.6,
which doesn't have the severe issue.


On Sat, 27 Aug 2016 at 06:55 Dmitry Shachnev <mitya57@ubuntu.com> wrote:

> On Sat, Aug 20, 2016 at 10:47:24PM +0000, Nick wrote:
> > Isn't the choice of dialogs intertwined with styles?
>
> The platform theme can suggest some styles using QPlatformTheme::StyleNames
> hint. But otherwise these things are unrelated.
>
> --
> Dmitry Shachnev
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[Attachment #5 (text/html)]

<div dir="ltr">Got a partial solution that is reasonably workable. Use a custom style \
(Clean Looks) and the Gtk 2 platform style library from Qt 5.6. Attached is a \
compressed file containing the 2 style files. Works at least with Linux Mint 17. \
Should work with Linux Mint 18, Ubuntu 14.04, and Ubuntu 16.04.<div><br></div><div>In \
order to improve styling in Linux with a PyQt 5.7 program place \
<b>libqcleanlooksstyle.so</b> file in \
<b>{your_venv_dir}/lib/python3.5/site-packages/PyQt5/Qt/plugins/styles</b>, and place \
<b>libqgtk2.so</b> file in  <span \
style="line-height:1.5"><b>{your_venv_dir}/</b></span><span \
style="line-height:1.5"><b>lib/python3.5/site-packages/PyQt5/Qt/plugins/platformthemes</b>. \
Also you will need to set the  </span><b>QT_QPA_PLATFORMTHEME</b> environment \
variable to <b>&quot;gtk2&quot; </b>before running a PyQt 5.7 program, otherwise the \
platform style isn&#39;t applied.</div><div><div><br></div><div>Not ideal but at \
least PyQt 5.7 programs are usable in Linux. One temporary workaround depending on \
project requirements is to downgrade to PyQt 5.6, which doesn&#39;t have the severe \
issue.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Sat, 27 Aug \
2016 at 06:55 Dmitry Shachnev &lt;<a \
href="mailto:mitya57@ubuntu.com">mitya57@ubuntu.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Aug 20, 2016 at 10:47:24PM \
+0000, Nick wrote:<br> &gt; Isn&#39;t the choice of dialogs intertwined with \
styles?<br> <br>
The platform theme can suggest some styles using QPlatformTheme::StyleNames<br>
hint. But otherwise these things are unrelated.<br>
<br>
--<br>
Dmitry Shachnev<br>
_______________________________________________<br>
PyQt mailing list      <a href="mailto:PyQt@riverbankcomputing.com" \
target="_blank">PyQt@riverbankcomputing.com</a><br> <a \
href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" \
target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></blockquote></div></div></div>



["Qt 5 Plugins.7z" (application/x-7z-compressed)]
[Attachment #7 (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