Change style



  • Hello!

    In the 'Examples' folder of my QtSDK installation I found a nice program that shows how to change the appearance using style sheets. If I understand the code correctly, other changes can be done using styles. Can I somehow create my own style? (not style sheet).
    I am going to use widgets in an OpenGL game and I want to apply some changes, for example increasing the windows' title bars' size; setting minimize, maximize and close buttons to left aligned; and other general layout-dedicated things that can't be done from within a style sheet.

    Thanks in advance, aVoX.

    PS: I am totally new to Qt so if you leave a reply, please add an idiot-proof description.



  • Of course you can, and you can find demoes such as examples/widgets/styles .

    But be aware that developing a fully functional custom style is a major undertaking that typically requires 3000 to 5000 lines of C++ code. For this reason, it is often easier and more convenient to use Qt style sheets whenever possible



  • Thanks for your answer!
    I tried to execute the demo at widgets\styles but somehow it does not seem to compile the files, because there is no executable in the path specified and the output window says "Failed to start program. Path or permissions wrong?"
    What could be the problem?



  • I have no idea why the example does work under your computer. Do other examples work?



  • [quote author="1+1=2" date="1333230079"]I have no idea why the example does work under your computer. Do other examples work?[/quote]

    Most of the other examples work perfectly.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.