how do you use QML to changing skins(themes)
I want to use QML for skin change，widgets + qss are easy to implement,but I'm not sure what to do with QML. who can tell me how to do it, thanks
Hello! AFAIK, you can create global variables for each element value of your 'appskin' you want to change (width, height, background color/image, etc) for each element ( like button, listview, etc.). The next step is to set values of your elements as they are set in 'global variables', eg:
, or something like that. And, the last step is to create a method, which changes global variables, eg load values from 'application skin file' or smth like that. And when you want to change app skin you just call this method with skin name/skinFilePath as a param. And, ofc, don't forget to check values from external skin file for validity. That's all. Hope in helps.
Maybe you can try the CSS approach implemented here : https://github.com/Ableton/aqt-stylesheets
See video here : https://www.youtube.com/watch?v=O5GJCyBOuCY