Results 1 to 2 of 2

Thread: Set stylesheet of a specific QTabWidget

  1. #1
    Join Date
    Mar 2011
    Posts
    12
    Thanks
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Set stylesheet of a specific QTabWidget

    As per documentation, I can set the "tab" stylesheet of all QTabWidgets using QTabBar::tab, but this propagates to all other tabwidgets.

    Can I set the style of a specific tab without reimplementing QtabWidget? something like QTabWidget#mytab?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,325
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Set stylesheet of a specific QTabWidget

    Are you talking about the style for the tabs themselves or for the page widgets that are managed by the QTabWidget? For the tabs themselves, you can set color, text, and other properties on individual tabs through the QTabBarinstance for the QTabWidget.

    I do not know if QTabBar::setText() supports Rich Text Format, but if it does, you may be able to further control the appearance that way.

Similar Threads

  1. Replies: 2
    Last Post: 14th October 2012, 19:37
  2. QTabWidget stylesheet properties
    By Prompt in forum Qt Programming
    Replies: 0
    Last Post: 18th March 2009, 20:29
  3. QTabWidget stylesheet
    By GuS in forum Qt Programming
    Replies: 3
    Last Post: 6th December 2007, 22:31
  4. QFrame/QTabWidget stylesheet.
    By fanat9 in forum Qt Programming
    Replies: 2
    Last Post: 2nd December 2007, 22:24
  5. StyleSheet Problem with QTabWidget
    By December in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2007, 22:16

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.