Pyqt style can be configured. The default style of PyQt is called ‘Fusion’. But this isn’t the only style. You may want to distribute your app on multiple operating systems, and have a native look and feel.

If you are on Windows, you may want a Windows look. On Mac you may want the Mac OS X style. All of these can be configured. The Mac style is only available on Mac OS X.

Related Course:
PyQt Desktop Apps with Python

PyQt style

Available styles

The available styles may differ system to system. You can get a list of available styles using the Python interpreter, like so:

1
2
3
4
5
6
7
$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5.QtWidgets
>>> print(PyQt5.QtWidgets.QStyleFactory.keys())
['Breeze', 'Oxygen', 'QtCurve', 'Windows', 'Fusion']

The Breeze style looks like this:

pyqt breeze style

Configure style

You can set the style with the line app.setStyle('Fusion').

Like so:

1
2
app = QApplication([])
app.setStyle('Windows')

Then the window shows like this (the old Win 9x style):

pyqt windows style

Download Examples