Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT5 Creator - MainWindowS Skinning for Mac&Windows
QtWS25 Last Chance

QT5 Creator - MainWindowS Skinning for Mac&Windows

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NoFreeUsername
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      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.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NoFreeUsername
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved