Results 1 to 2 of 2

Thread: How to get notified about changes in global color scheme

  1. #1
    Join Date
    Jun 2017
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How to get notified about changes in global color scheme

    Hi
    I have a class which stores some QColors based on the desktop's colour scheme. I would like to get the colours updated as soon as the user changes the colour scheme. How can I do this?
    The program is for KDE, so maybe a KDE-specific solution would be fine, too.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to get notified about changes in global color scheme

    In Windows, there is a WM_SYSCOLORCHANGE message that gets sent to all top-level windows. If there is a similar mechanism in KDE (I don't know), you should be able to intercept these by reimplementing QCoreApplication::winEventFilter() in a derived class.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Url protocol scheme
    By #Dragon in forum Qt Programming
    Replies: 5
    Last Post: 15th January 2016, 20:25
  2. Different Color Scheme between XP and Windows 7
    By KenJustKen in forum Qt Programming
    Replies: 2
    Last Post: 8th December 2011, 08:02
  3. Scheme editor
    By zzz9 in forum General Discussion
    Replies: 0
    Last Post: 7th June 2011, 09:10
  4. Text editor color scheme
    By kosasker in forum Qt Tools
    Replies: 4
    Last Post: 14th February 2011, 22:36
  5. qtcreator text editor color scheme problem
    By elflord in forum Qt Tools
    Replies: 1
    Last Post: 5th March 2009, 18:42

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.