12

I'm experimenting with QuickControls with latest PyQt5 and trying to apply Material style via QML as explained here and here:

QQuickStyle::setStyle("Material");

But unfortunately I can't find any refernces to QQuickStyle class in PyQt to apply style via python code and only working solution is to specify command line argument for this:

python app.py -style material

Could someone point me to the correct applying QuickControls style via python script please?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Merlin
  • 121
  • 1
  • 4

1 Answers1

13

I am looking for QQuickStyle too, PyQt seem doesn't has QQuickStyle class, but you can do this in code,

sys_argv = sys.argv
sys_argv += ['--style', 'material']
app = QGuiApplication(sys_argv)
Huibean Luo
  • 151
  • 6