Results 1 to 2 of 2

Thread: Changing QTabWidget's tabs color

  1. #1
    Join Date
    Apr 2007
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Changing QTabWidget's tabs color

    I want to do something like this (attachment).
    QPalette::setColor(QPalette::Base, QColor()); disagree, because it change only non-acive tabs and change color of all child widgets

    PS. Sorry for my English
    Attached Images Attached Images

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

    Default Re: Changing QTabWidget's tabs color

    It's hard to do. I already thought about it. And basically it won't work on some widget styles. The thing is you'd have to change the palette before drawing each tab and there is no easy way to do that. So unless Trolltech introduces some API for this, you can forget about achieving what you want.

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.