QT5 Creator - MainWindowS Skinning for Mac&Windows
-
Hello,
how should i explain this.... an example:
Lets say we have 10 People who are using my App.
Each Guy wants his own Custom Skin, MainWindow should have a Different look for all these People.Solution wish i want to go:
-
Having 10 MainWindows UIs and 1 MainWindow Class (Function/Methods still the same)
-- mainwindow.ui, mainwindow-skin1.ui, mainwindow-skin2.ui,.... -
each MainWindow have different Logos, custom css...
-
via some sort of settings i want to choose wish one the compiler has to compile
-
it should work on mac and Windows
Is there a nice way with QT5 Creator (no in code solution with css) ?
Can i use something like plists?And Lets assume, there is this Designer/Graphical Guy who has no clue about Coding but with css and customizing ui files?
Is there a way? Or some different Paths which i can choose? Wish Code Solution could i use?
10 Different css Files? How can i load these at Compiling/Building?
(And still there is this well known problem between mac&windows about font sizing -> it means we should have 20 Css Files???)Some Suggestions?
-
-
Hi,
for css, you can use Qt Style sheets (qss) files. You can load them during runtime and set them to the application.
Regarding the ui thing, you can load ui files dynamically at run time, but I am not sure, whether you can set them to an existing class, that would be strange.
-
Thanks.
Normally i use XCode for Mac Only Targets and there you have different Targets and they create a list wish defines UI Files/Images/Classes wish will be compiled or copied.
I dont want a Runtime Solution i want a Compile Solution, one attempt could be to change the qmake Call and just switch the ui files.
But then again i can't use QT Creator?Basically i want to press Compile/Build and then i get 1 App with a certain Skin, wish i choose before Compiling by setting a Flag.
And im quite unsure if QT Creator is able to do something like that.
I forgot to mention it have to be a value wish i can Commit to SVN..
And Jenkins(a automatic build/upload system) or someone who does a Checkout, can read these Settings and do Builds based on that. In XCode its released with a .plist and a complex Settings File.
For example in QT Creator i can add different Build Configurations but i don't see a way how do declare a own UI File there.
Edit:
Okay, a possible is to add more Build Configs and a Runtime Solution should be
qmake DEFINES+=SKIN=1,2,3,4,5,...
and to load a css/qss for a certain SKIN.I question if there is a way with UI Files too.