Unsolved How to judge the current style?
-
I have a custom control, such as MText {}.
How do I determine whether the current style is Material or Universal?
-
Hello @zhangXianxiang and welcome to Qt Forum.
Firstly, can you define it better?
I suggest you to read the QtQuickControl2 Style documentation, it will explain how you can change the Style of your application.
QtQuickControl2 - Using Styles
Note: In this method, it's only changable before the qml file is loaded. If you are trying to change the style in runtime.
Check out this StackOverflow Post:
https://stackoverflow.com/questions/44951317/qml-qtquickcontrols2-change-style-properties-at-runtime