PDA

View Full Version : How to unify the QT style in different platforms?



yangyunzhao
5th August 2009, 03:39
First of all ,sorry for my poor english.

I just want to unify style not custom style.

For example:
I want my program has a same style in linux and in windows. In the two platforms, I want my program use the windowsxp style or use the linux style or others.

nish
5th August 2009, 03:45
some styles are platform dependent... for example winXP style works only on windows xp or later and mac style works only on mac...
some styles are available on all platform like cleanlooks.... but it does not look good on mac. On windows and linux.. cleanlooks is good.

yangyunzhao
5th August 2009, 04:04
some styles are platform dependent... for example winXP style works only on windows xp or later and mac style works only on mac...
some styles are available on all platform like cleanlooks.... but it does not look good on mac. On windows and linux.. cleanlooks is good.


That's OK. I like cleanlooks style.
Could you tell how to set cleanlooks style in my program on windowsxp or later and linux?

yangyunzhao
5th August 2009, 04:12
A more question.

Can I export the cleanlooks style ,modify it, rename it ,and use it on different platforms?

Because I think it's very difficult and troublesome to create a new style.

yogeshgokul
5th August 2009, 05:41
Could you tell how to set cleanlooks style in my program on windowsxp or later and linux?
For application vise style use:

QApplication::setStyle("cleanlooks");

yangyunzhao
5th August 2009, 05:58
For application vise style use:

QApplication::setStyle("cleanlooks");
Thanks a lot!But
1、I find that It's not the same styles,just similar styles on windowsXP and Linux.
2、How to export the cleanlooks style, modify it, rename it, and use it on different platforms?

nish
5th August 2009, 06:10
inherit your style from QCleanLooksStyle and reimplement the virtual functions... or you can use the proxy style technique... search for QStyle in qt assistant... and learn..

profoX
5th August 2009, 11:23
You might also want to check out style sheets :) it's easier to combine a custom style with stylesheets to gain a unique look :) Cleanlooks might look different on Windows than in GNOME because Cleanlooks takes some GNOME settings into account on Linux.