Custom Window Title Buttons / Colors
Hello everyone,
I've got a question or well let's say im interesting in modifing my Qt Window. (such things as close button, maximize etc.)
I know , Qt has a lot of WindowStates/Flags but that's not what I am looking for. For example Google Chrome, they modify their whole window especially the title bar.
I don't know but I think the title bar is not drawn by Qt. It's a job for the underlying system (Windows, Unix etc.) isn't it?
So my question, do I have any possibilities to change the Window Title bar (with Qt)? Or could someone give me a hint how to do it?
(Example: Chrome with the color, Skype with another button and so on.)
Regards,
Re: Custom Window Title Buttons / Colors
You cant do anything with the title bar coz qt does not draw it. What you can do is that use FrameLessWindowHint (search for it in assistant) and then draw your own title bar. There are lot of examples on the net for that. There is even one in assistant which shows you how to implement mouse move events for a frameless window
Re: Custom Window Title Buttons / Colors
Ok thanks, but how to implement those Vista / 7 Buttons - or Windows XP minimize, maximize and "x" ?
Do you think I've got the chance to draw those with the Windows API instead of drawing everything myself?
Re: Custom Window Title Buttons / Colors
Quote:
Originally Posted by
MrDeath
There is even one in assistant which shows you how to implement mouse move events for a frameless window
What example do you mean?
Re: Custom Window Title Buttons / Colors
Re: Custom Window Title Buttons / Colors
Quote:
Originally Posted by
zack
What example do you mean?
this one .. qt-src-dir/examples/widgets/analogclock, and many others.
Re: Custom Window Title Buttons / Colors
Quote:
Originally Posted by
Sven
Ok thanks, but how to implement those Vista / 7 Buttons - or Windows XP minimize, maximize and "x" ?
Do you think I've got the chance to draw those with the Windows API instead of drawing everything myself?
I guess you can get those icons through window api, but you have to draw them urself onto your widget. Better approach would be to have the icons as png(or any format u like) as an resource file. this way you dont have to worry about windows api and your application will have the same look on all platforms.
Re: Custom Window Title Buttons / Colors
But thats not what I want. On Unix , i use the default Unix style but on Windows I want to use their Buttons (without having them as a PNG because of the hovering effects and so on).
Well I'll take a look into Windows WindowManager. Maybe there are some information about using these standard buttons and how to modify them. ;-)