Results 1 to 20 of 34

Thread: Colored Buttons

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Colored Buttons

    Qt Code:
    1. QPalette palette;
    2. palette->setBrush( QPalette::Background, QBrush( Qt::green ) );
    3. myButton->setPalette( palette );
    To copy to clipboard, switch view to plain text mode 

    Check out the color roles in QPalette.

    Regards

  2. The following user says thank you to marcel for this useful post:

    Walsi (24th April 2007)

Similar Threads

  1. Main window with custom buttons ?
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2006, 06:32
  2. array of radio buttons
    By amulya in forum Qt Programming
    Replies: 4
    Last Post: 5th October 2006, 12:59
  3. widget for text AND buttons
    By nongentesimus in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 13:43
  4. Replies: 9
    Last Post: 9th May 2006, 19:53
  5. How to get larger radio buttons on XP?
    By Ben.Hines in forum Qt Programming
    Replies: 9
    Last Post: 24th April 2006, 19:00

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.