Results 1 to 6 of 6

Thread: How to set color for QGroupBox Title

  1. #1
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default How to set color for QGroupBox Title

    I want to set color for GroupBox Title, just for title, not whole background.
    How can I do that?

    Thanks & Regards,
    Arun

  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 set color for QGroupBox Title

    I don't know if it will work, but have you tried using HTML (rich text) to specify the group box title?

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

    Default Re: How to set color for QGroupBox Title

    Change the palette for the groupbox ( Window Text)

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to set color for QGroupBox Title

    Or try style sheets...
    J-P Nurmi

  5. #5
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to set color for QGroupBox Title

    I tried using HTML tags in setTitle. But it didn't help.
    Also tried by changing palette for window text from designer. It is changing color to all the widgets inside the GroupBox.
    I just need to change the color for Groupbox title.
    I don't know how to use style sheets. Can you give me hint on how to use?

    Thanks & Regards,
    Arun.

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to set color for QGroupBox Title

    Quote Originally Posted by arunvv View Post
    I don't know how to use style sheets. Can you give me hint on how to use?
    Launch Qt Assistant and write "style sheets" to the Index-tab.
    J-P Nurmi

Similar Threads

  1. Replies: 5
    Last Post: 21st April 2008, 07:54
  2. Setting the title bar
    By Krish_ng in forum Qt Programming
    Replies: 1
    Last Post: 18th July 2007, 11:55
  3. QGroupBox title truncated on both sides
    By Gopala Krishna in forum Qt Programming
    Replies: 2
    Last Post: 7th October 2006, 15:02

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.