Results 1 to 4 of 4

Thread: Background color of toolButton

  1. #1
    Join Date
    Apr 2012
    Posts
    49
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    14
    Thanked 3 Times in 3 Posts

    Default Background color of toolButton

    hi,

    Could anyone please tell me , how to set the background color of tool button to red??

  2. #2
    Join Date
    May 2012
    Posts
    136
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    2
    Thanked 27 Times in 24 Posts

    Default Re: Background color of toolButton

    you can do it by using a stylesheet check this http://doc.qt.io/qt-4.8/stylesheet

  3. #3
    Join Date
    Apr 2012
    Posts
    49
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    14
    Thanked 3 Times in 3 Posts

    Default Re: Background color of toolButton

    Thanks for your reply.

    I checked the link that you are given. In that it is mentioned all toobox in the QWidget will change to custom color.

    I need to change only the particular tool button color.

    Could you please post some source to explain,so that i can understand better.


    Thanks in Advance.

    Regards
    Vinithr

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Background color of toolButton

    What do you want? First you ask about QToolButton and then refuse the advice citing something to do with "all toolbox in the QWidget". Since QToolButton has nothing to do with QToolBox this makes little sense.

    There's even an example specifically for QToolButton here.

Similar Threads

  1. Background color
    By FelixB in forum Qwt
    Replies: 4
    Last Post: 24th June 2013, 08:03
  2. Qt4 - QTextEdit - background color
    By impeteperry in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2009, 08:52
  3. Background color of GLWidget
    By mullwaden in forum Qt Programming
    Replies: 3
    Last Post: 21st August 2008, 18:24
  4. background color of menu bar
    By sabeesh in forum Qt Programming
    Replies: 6
    Last Post: 24th July 2007, 13:48
  5. background color of a MainWindow
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 24th July 2007, 10:27

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.