Screenshot:
Screenshot:
Now the classes are available at qt-apps.org
Please take a look, because they now have an option which makes widgets look like
Vista Aero Widgets.
http://qt-apps.org/content/show.php?content=67309
I hate to be a spoil-sport, but I have some comments on your work. Don't you think you are entering the competence of a window manager? From what I understand you get rid of standard window decorations by creating frameless windows and draw the "skin" yourself, correct? That's exactly what a window manager is supposed to do. Using your approach one breaks one of the fundamental features of Qt - platform integration. Qt apps are meant to blend into the operating system and look exactly the same as "native" applications. If one changes the theme in the window manager (be it Aero, Aqua or KDE), Qt applications will adjust. This is not the case with your approach (although of course you've done a great job in doing what you did, it looks neat), so the use of your component is really limited. Especially on X11 platforms and when KDE4 enters the scene, your solution will become obsolete on this platform. In my opinion you are doing a step back here - you are "forcing" the programmer to think about low-level things (like borders, decorations, skins, window geometry etc.) instead of hiding those details from him. I admit your solution is pretty, but I'm not sure if it is a step in the right direction.
it's not mentured to be used for big apps...
it's something what you can use for small tools, which shouldn't look like normal apps...
i understand what you mean, but sometimes it's nice to have another decoration than the normal apps, or?
For an IDE or an EMail CLient or an internet browser i would never use this classe, because it doesn't fit, but for eg a pdf printer (windows), or chat program it's not bad, or?
The point is that it is the end-user who should decide how the application looks like and not the programmer. Looking at the screenshot you provided I see you actually try to mimic the look of real Windows decorations. The type of application doesn't really matter here.
I mean that the idea itself is ok, it's just that I think you are doing it on a wrong level. If you implemented it as a window manager decorator or even a QStyle subclass (with some style hacking of course) it would be a general use approach.
hm, ok...
but for style hacking i have to hook the window manager and than it isn't multiplatform anymore....
No no... by the style I mean QStyle and hacking involves things like setting proper pixel metrics and stuff. But really, I have nothing against your approach - I just think its usefulness might be very limited. And of course slower than drawing directly on a widget (actually to the backstore).
how can i do this?
show me code and i will try!
I don't have a ready solution for everything.
Well, it can be done, but styling the title bar and window frame has nothing to do with QStyle, at least not on Win and Mac.
You can do it relatively easy on Windows, there are lots of resources on codeproject and codeguru, but I have no idea on how can you do it on Mac. There has to be something on developer.apple.com.
My opinion is that you can get away with making it look good on Win and Linux, but there's another story on Mac. I can't imagine a window like that looking good on that platform. They even have a GUI design guidelines document(it's freely available) on how to make your application integrate with the desktop and the other applications look and feel.
Ok now!
It works and that is all that it should do. and it works on window / linux, all that i wantet. Maybe the way how it does the skinning isn't perfect, but it works.
If someone has an code example or can me say how to make it better, ill test it. But pls, don't grumble without having a better solution!
Carpe Diem! Markus
Oh come on! A brainstorm often helps you know. No need to take it personal. If I had a solution ready, I'd just post it instead of pointing out possible weaknesses in yours. And believe me, you wouldn't have to test it just the same as you don't have to agree with me or even read my posts. You can even ignore me completely, this forum's software offers that possibility.
Bookmarks