Results 1 to 3 of 3

Thread: Linux - Support system's theme change

  1. #1
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Linux - Support system's theme change

    Hi,

    I have just noticed that though my application works as I would expect on Linux (Ubuntu 11.04), if I change my system's theme, then my application doesn't fully handle the change. The window border decoration will respect the theme, but the menus, dialog buttons, etc. won't.

    I have just checked with the Qt (4.7.3) demos (which I manually built on my Ubuntu 11.04 box) and it's the same. They, in fact, use the same (default?) theme as my application. However, everything works as I would expect using Qt Creator 2.2.1.

    So, what is the difference between my application / the Qt demos and Qt Creator? How do I go about ensuring that my application respects the system's theme?

    Cheers, Alan.

    P.S.: I have just checked on Windows and Mac OS X, and as far as I can tell everything works as expected, i.e. my application handles changes in the system's theme without any problem.

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Linux - Support system's theme change

    Don't know exactly how to do this. But note that the theme is not a property of the Linux system - it belongs to the desktop currently in use, which could be Gnome, Kde or dozens of others. While there may be a few corresponding themes in Qt's toolkit, for the most part the diversity of Linux desktops will make this an exercise in frustration.

  3. #3
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Linux - Support system's theme change

    Yes, it would seem that it might end up being a waste of time to try to get things to work as I would hope. This being said, Qt Creator works as I would expect on Ubuntu 11.04, so...?

Similar Threads

  1. How to change theme of a window
    By sudheer168 in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2009, 13:46
  2. Change Qt theme while running
    By Macok in forum Qt Programming
    Replies: 7
    Last Post: 12th February 2009, 19:57
  3. How to change system DateTime?
    By FreePascal in forum Qt Programming
    Replies: 8
    Last Post: 5th April 2008, 14:50
  4. change operating system theme.
    By rajeshs in forum Qt Programming
    Replies: 2
    Last Post: 20th March 2008, 04:02
  5. Replies: 5
    Last Post: 13th April 2007, 16:16

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.