Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyQt5 QuickControls Material style

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?

like image 872
Merlin Avatar asked Mar 29 '17 12:03

Merlin


1 Answers

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)
like image 123
Huibean Luo Avatar answered Nov 02 '22 07:11

Huibean Luo