This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Qt4 Theming Tutorials?

Tags: None
(comma "," separated)
LastGuyonEarth
Registered Member
Posts
16
Karma
0

Qt4 Theming Tutorials?

Sun Oct 12, 2008 8:26 pm
I've been searching Google for a while, but to no avail. So, I have to simply ask: does anyone have a thorough guide on theming for KDE4? I've had some nice ideas for both Plasma and Qt4 widgets, but I'm not even sure where to start with those.

As a side note, are there some specific guides that would be useful for someone wanting to write a Plasmoid or two?


"As the Days change like weather, all of you must know:
Everything gets better. Everything regrows."

-Forest, from "Under an Iron Tree" by Sean Tilley
User avatar
neverendingo
Administrator
Posts
2136
Karma
17
OS

RE: Qt4 Theming Tutorials?

Sun Oct 12, 2008 8:34 pm
Did you already have a look at techbase?
For a Theming tutorial see this: http://techbase.kde.org/Development/Tut ... asma/Theme

For a tutorial on plasmoids see
http://techbase.kde.org/Development/Tut ... ingStarted


New to KDE Software? - get help from Userbase or ask questions on the Forums
Communicate.
Image
LastGuyonEarth
Registered Member
Posts
16
Karma
0

RE: Qt4 Theming Tutorials?

Sun Oct 12, 2008 8:51 pm
Well, those are nice! But, what I'm really specifically looking for is Qt4 toolkit theming.


"As the Days change like weather, all of you must know:
Everything gets better. Everything regrows."

-Forest, from "Under an Iron Tree" by Sean Tilley
Elv13
Registered Member
Posts
23
Karma
0
OS

RE: Qt4 Theming Tutorials?

Sun Oct 12, 2008 9:01 pm
http://doc.trolltech.com/4.4/qstyle.htm ... stom-style

You have to know C++ to do this. If it is just for one apps, you can use QStyleSheet and CSS, it is fast and easy.

Good luck!

Last edited by Elv13 on Sun Oct 12, 2008 9:02 pm, edited 1 time in total.


Elv13, proud KDE user since KDE 2.2.
User avatar
JLP
KDE Developer
Posts
12
Karma
0
OS

RE: Qt4 Theming Tutorials?

Sun Oct 12, 2008 9:03 pm
For Qt4 styling you can use Qt Style Sheets which is more simple way of styling but not so powerfull. Maybe it will be enogh for your needs. For full power styling you need to check out the QStyle Class Documentation. Also take a look at KStyle.


ImageImage
longhh
Registered Member
Posts
1
Karma
0

RE: Qt4 Theming Tutorials?

Tue Oct 14, 2008 12:06 am
Hi,

Theming in Qt IS a nasty thing, if you wan't to code a new theme from bottom up ... (I think I can say this as part-time oxygen-patch-writer ;))

I learned qt styling by looking at existing code and heavy usage of qt assistant :D
First of all you should elaborate on your "nice ideas" before starting coding, and be aware of that not everything can be implemented (at least without dozens of hacks). And if you manage to find a kind coder you're the luckiest last guy on earth!

Don't use KStyle, unless you are willing to do some occasional bug fixing and like to work with its different documentation. Code can be copied from existing styles, long live open source ;)

with kind regards

PS: The has been an attempt to write a style engine based on svg (cokoon) which has never reached a releasable state. It is located somewhere in KDE's svn repo. A resurrection would not be such a bad idea, it would make theming sooo much easier... + initial work has been done
sickrandir
Registered Member
Posts
7
Karma
0

RE: Qt4 Theming Tutorials?

Mon Nov 24, 2008 4:08 pm
longhh wrote:PS: The has been an attempt to write a style engine based on svg (cokoon) which has never reached a releasable state. It is located somewhere in KDE's svn repo. A resurrection would not be such a bad idea, it would make theming sooo much easier... + initial work has been done


Oh man, I didn't know about this attempt to write a style engine based on svg! Theming in Qt/KDE require to much programming skills and this directly impact the small number of original and well maintened themes available (although I have to say that the existing ones are really gorgeous!). I believe theming should be something easier and more friendly for designers. Possibly similar to how is done in plasma. It's a shame that new gtk themes get out everyday while the situation in kde is so blocked. They need to lower the barriers for Qt theming!


sickrandir, proud to be a member of KDE forums since 2008-Nov.
User avatar
Brandybuck
KDE Developer
Posts
203
Karma
0
OS

RE: Qt4 Theming Tutorials?

Mon Nov 24, 2008 5:18 pm
sickrandir wrote:I believe theming should be something easier and more friendly for designers.

Theming in Qt is done the way it is for several reasons, not the least of which is that Qt needs to match the themes of existing platforms. There are several dozen graphical primitives, used alone or combined into several dozen higher level controls, plus functions to query extents, set behavior, etc.

This can all be combined into a pixmap or svg engine (as with the commercial BasysKom theme), but it needs someone to do it. I've started one myself, but I already have too many tasks I am behind in.

CSS styling is a different route, and it is essentially a proxy style. It's still not complete yet (which gives you a hint as to the amount of work such flexibility entails), and being a proxy style does incur a small performance penalty. It's something you would use to theme just a few widgets that needed to look different, not an entire application or desktop.


Don't look back! (Or you might see the giants whose shoulders we stand on)
frustphil
Registered Member
Posts
32
Karma
0

RE: Qt4 Theming Tutorials?

Fri Nov 28, 2008 9:44 am
now i know KDE widget themes are not on par with Gnome's. sad..


frustphil, proud to be a member of KDE forums since 2008-Nov.
User avatar
xbullethammer
Registered Member
Posts
15
Karma
0
OS

RE: Qt4 Theming Tutorials?

Sun Nov 30, 2008 6:20 am
frustphil wrote:now i know KDE widget themes are not on par with Gnome's. sad..


Why? KDE themes are currnetly way better than GTK's

I'm not just talking about graphics but actual behaviour of the widgets: animations, cool effects... just try the Bespin style and look by yourself.


nothing :-)
frustphil
Registered Member
Posts
32
Karma
0

RE: Qt4 Theming Tutorials?

Sun Nov 30, 2008 3:54 pm
xbullethammer wrote:
frustphil wrote:now i know KDE widget themes are not on par with Gnome's. sad..


Why? KDE themes are currnetly way better than GTK's

I'm not just talking about graphics but actual behaviour of the widgets: animations, cool effects... just try the Bespin style and look by yourself.


holy cow! i didn't know bespin was around. :-)


frustphil, proud to be a member of KDE forums since 2008-Nov.
User avatar
Brandybuck
KDE Developer
Posts
203
Karma
0
OS

RE: Qt4 Theming Tutorials?

Mon Dec 01, 2008 6:02 pm
There is stuff an "engine" theme can do that a pixmap theme cannot. Widgets that elegantly change their sizes according to resolution and font; dynamic animations that are more than just rollovers; widgets whose elements can rearrange; etc.


Don't look back! (Or you might see the giants whose shoulders we stand on)


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell