Results 1 to 3 of 3

Thread: How to get background color of a control.

  1. #1
    Join Date
    Mar 2010
    Posts
    1

    Default How to get background color of a control.

    Hi,

    I am developing a plugin but before paint operation starts, i need to know background color to be used in paint operation. e.g
    if control resides on a grey or ( else if a theme is set) dialog, i need to get this color information. Control has to appear as blended to dialog, frame widget etc.

    Question is how to get this color information?

    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: How to get background color of a control.

    Qt Code:
    1. QWidget::palette()
    To copy to clipboard, switch view to plain text mode 
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: How to get background color of a control.


Similar Threads

  1. QLCNumber background color
    By drave in forum Newbie
    Replies: 2
    Last Post: 12th December 2009, 15:41
  2. textEdit background color
    By briang in forum Newbie
    Replies: 3
    Last Post: 5th November 2009, 17:24
  3. Replies: 2
    Last Post: 29th September 2009, 07:40
  4. background color of not selected tab
    By iridium in forum Qt Programming
    Replies: 0
    Last Post: 13th August 2009, 15:57
  5. background color for QGraphicsWidget
    By QAir in forum Qt Programming
    Replies: 1
    Last Post: 16th July 2009, 14:52

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
  •  
Qt is a trademark of The Qt Company.