Results 1 to 3 of 3

Thread: Re-skinning

  1. #1
    Join Date
    Jul 2010
    Location
    Woburn, MA (near Boston)
    Posts
    1
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re-skinning

    I am transitioning over to Qt4 from another embedded GUI product where I can re-skin a UI without recompiling any code. There is an engine that runs on the target. And a tool that allows me to create a GUI skin - the look/feel UI such as widget colors, location of buttons, etc. Then I write application code to hook the skin into the engine running on the target. So the 3 are all separate, the engine, the GUI skin and the application code.

    I can reskin (or rebrand) an application without recompiling the engine or the application code. Meaning I can replace the GUI skin on the fly, just drop it onto the target.


    2 questions:

    A) Trying to determine if and how I can do that with QT.
    Any advice is greatly appreciated.

    B) Does QT have the notion of a separate GUI skin where all the UI elements (button, images, color settings, etc.) are all contained in one single binary file. I see a file called the ".ui" file, but this looks like XML and so I do not believe that it contains images, etc. I am trying to determine if QT rolls the entire look.feel (GUI) into one file where I can move it from project to project?

    Thanks so much for any help,
    Dave

  2. #2
    Join Date
    Jul 2010
    Posts
    18
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Re-skinning

    Actually, you could create your own "skin engine". Basically, every button and every widget can be modded to use an image or something as it's appearance. you could have your program load all it's appearances from a single xml, or binary or zip or whatever, and then set it up so that whenever it loads all of this, it will load the pictures and stuff that it needs to make the gui's appearance.

    also, you might want to check into the different platform based appearances that qt has. who knows, you might be able to overload one of those, or inherit from it-whatever. Like, if you want, you can make qt look like x, or mac, or windows. that only takes one line.

    If you get into qt designer, you could probably find a way to change each object's appearance, but that would take a while.

  3. The following user says thank you to kennethadammiller for this useful post:

    davidgould (9th July 2010)

  4. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Re-skinning

    Read about QStyle and Qt Style Sheets

  5. The following user says thank you to aamer4yu for this useful post:

    davidgould (9th July 2010)

Similar Threads

  1. QToolButton customization / skinning
    By Treggie in forum Qt Programming
    Replies: 8
    Last Post: 20th February 2010, 20:20

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.