PyQt5 QuickControls Material Style

I am experimenting with QuickControls with the latest PyQt5 and trying to apply material style through QML, as described here and here :

QQuickStyle::setStyle("Material"); 

But, unfortunately, I cannot find references to the QQuickStyle class in PyQt to apply the style through python code, and the only working solution is to specify a command line argument for this:

 python app.py -style material 

Can someone point me to the correct QuickControls style via python script, please?

+7
python qt pyqt5 pyqt qtquickcontrols
source share
1 answer

I'm looking for a QQuickStyle too, PyQt doesn't seem to have a QQuickStyle class, but you can do this in code,

 sys_argv = sys.argv sys_argv += ['--style', 'material'] app = QGuiApplication(sys_argv) 
+4
source share

All Articles