سؤال

My goal is to create a skinning module that loads skins from somewhere and then changes the look of the application based on that current loaded skin. I've thought of using resource files that incorporate all the images, fonts and json files that hold the color properties of the application but I also discovered recently that skinning can also be done via Qt Style Sheets. My questions are:

  • What professional solutions do I have in skinning a Qt Application (generical speaking)?
  • How can I use Qt Style Sheets in combination with QML so that I can easily change the background images (from source, or somewhere else), colours, etc. ?
  • What is the best way of storing skins for Qt Applications?

ADD: My application is described in QML so stylesheets aren't possible here. How can I style this kind of application? I Would appreciate if all the previous questions would be answered as well so other users might find it usefull.

Anticipated thanks.

هل كانت مفيدة؟

المحلول

Provably you can get better answers but what I've been doing is to write different style-sheets and store them as a internal resources. Then you can dynamically change from 1 style-sheet to an other or even parse the loaded style-sheet, change the background color or other values, and write it to an user folder so every user can personalize the looking.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top