Results 1 to 8 of 8

Thread: How to unify the QT style in different platforms?

  1. #1
    Join Date
    Jun 2009
    Posts
    22
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How to unify the QT style in different platforms?

    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.

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to unify the QT style in different platforms?

    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.

  3. #3
    Join Date
    Jun 2009
    Posts
    22
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to unify the QT style in different platforms?

    Quote Originally Posted by MrDeath View Post
    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?

  4. #4
    Join Date
    Jun 2009
    Posts
    22
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to unify the QT style in different platforms?

    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.

  5. #5
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to unify the QT style in different platforms?

    Quote Originally Posted by yangyunzhao View Post
    Could you tell how to set cleanlooks style in my program on windowsxp or later and linux?
    For application vise style use:
    Qt Code:
    1. QApplication::setStyle("cleanlooks");
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Jun 2009
    Posts
    22
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to unify the QT style in different platforms?

    Quote Originally Posted by yogeshgokul View Post
    For application vise style use:
    Qt Code:
    1. QApplication::setStyle("cleanlooks");
    To copy to clipboard, switch view to plain text mode 
    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?

  7. #7
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to unify the QT style in different platforms?

    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..

  8. #8
    Join Date
    Mar 2008
    Posts
    27
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to unify the QT style in different platforms?

    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.

Similar Threads

  1. QTabWidget transparent background problem
    By destroyar0 in forum Qt Programming
    Replies: 10
    Last Post: 25th June 2009, 12:19
  2. Performace problem with style sheets
    By Cruz in forum Qt Programming
    Replies: 0
    Last Post: 7th February 2009, 13:20
  3. Mac Style for Qt Application---help needed
    By swamyonline in forum Qt Programming
    Replies: 3
    Last Post: 15th June 2008, 21:49
  4. Loading / setting custom style on win-xp
    By mpotocnik in forum Newbie
    Replies: 0
    Last Post: 29th April 2008, 11:38
  5. Qt 4.3 Style sheet, new features
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2007, 15:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.