Results 1 to 11 of 11

Thread: How to change color of Tab in QTabWidget?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 25 Times in 24 Posts

    Default Re: How to change color of Tab in QTabWidget?

    I created project using qmake -tp vc xxx.pro
    and compling using VC++ on windows xp.
    so, hot to set -style <stylename> ?

    wysota code changing only text color.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: How to change color of Tab in QTabWidget?

    Quote Originally Posted by rajesh
    I created project using qmake -tp vc xxx.pro
    and compling using VC++ on windows xp.
    so, hot to set -style <stylename> ?
    Run it from the command line and give it the above mentioned parameter, like:
    xxx.exe -style plastique

    wysota code changing only text color.
    Not only (inactive tabs are coloured and active one has a yellow border), but the point is it doesn't work like expected. It probably takes the tab colour from the main widget associated with the tab, so you might try to change the colour of that and see if the tab changes too.

  3. #3
    Join Date
    Oct 2013
    Posts
    1
    Qt products
    Qt3

    Default Re: How to change color of Tab in QTabWidget?

    It's not working for me!!!

Similar Threads

  1. Change background color of QPushButton
    By gtthang in forum Qt Programming
    Replies: 3
    Last Post: 26th November 2013, 10:23
  2. Can't change the text display of a QTreeview item.
    By johnny_sparx in forum Qt Programming
    Replies: 3
    Last Post: 2nd June 2006, 01:03
  3. When itemChanged is emitted, can the change type be detected?
    By johnny_sparx in forum Qt Programming
    Replies: 3
    Last Post: 7th April 2006, 17:29
  4. Corner widget in QTabWidget doesn't show up
    By ePharaoh in forum Qt Programming
    Replies: 2
    Last Post: 6th April 2006, 17:02
  5. QTableView change color of current Cell
    By raphaelf in forum Qt Programming
    Replies: 4
    Last Post: 4th March 2006, 11:22

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.