[PyQt] PyQt Digest, Vol 145, Issue 25

Dmitry Shachnev mitya57 at ubuntu.com
Sat Aug 20 19:02:53 BST 2016


On Fri, Aug 19, 2016 at 11:42:45AM -0700, David Cortesi wrote:
> > When running the sample the file dialog looks way out of place (UGLY in
> > a hugely distracting way).
>
> You might experiment with the -style option when starting the application.
> I did this in one case to avoid a problem in the native toolkit:
>
>     args = []
>     if sys.platform == 'linux' :
>         # avoid a GTK bug in Ubuntu Unity
>         args = ['','-style','Cleanlooks']
>     the_app = QApplication( args )

Styles and dialogs are unrelated things. The original question was about
not using GTK+ dialogs, which can be fixed by building and using the GTK+
platform theme. This has nothing to do with the styles.

Also, instead of the args hack in your snippet, you can better use API:

  the_app.setStyle('cleanlooks')

See https://doc.qt.io/qt-5/qapplication.html#setStyle-1

-- 
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160820/8e742ec0/attachment.sig>


More information about the PyQt mailing list