[PyQt] PyQt Digest, Vol 145, Issue 25

Nick napperley at gmail.com
Sun Aug 28 01:38:36 BST 2016


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 at 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 at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160828/c75b9495/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Qt 5 Plugins.7z
Type: application/x-7z-compressed
Size: 120509 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160828/c75b9495/attachment-0001.7z>


More information about the PyQt mailing list