How to change style of window?
-
Hello
Is it possible to change style of windows application in Qt? I want some styles like Delphi 6 styles.
For example program should be able to change style its style from Windows XP default to a Vista-like, or Mac style (Window control buttons, widgets and background changes...) -
Do you want this to happen on a windows system only?
Qt follows the style of the OS it is on, but you can change the style yourself. You can even test some of them using Qt Creator using the form preview.
Some of the styles are dependant of the OS. On Windows for instance it is not possible to have the Mac style because the mac api's are needed for that.You can use code to set the style and you can make your own style if you want.
there is a good introduction in the "the official -QT- Qt book.":http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip -
-
-
[quote author="Eddy" date="1313307714"]
"the official -QT- Qt book.":http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip
[/quote]
Eddy you did it again :-D -
[quote author="soroush" date="1313309286"]bq. Changing this must be done in an OS dependant way by overwriting some messages…
So, how should I do that?[/quote]
As I told you, it's OS dependant. I don't know how to do it on Linux / mac, but on windows, you have to overwrite winEvent and handle WM_NCXXX messages. there are couple of descriptions around on the internet about that, so I suggest you search with google. It's not trivial, and it's on my list to write a wiki for windows on that, but that's currently far away, it's much code you need for that currently...