PyQT - setting the text color for a QTabWidget
Asked Answered
C

1

2

Is there any way to set the text color of a certain tab that's part of a QTabWidget? QTabBar seems to have a method to set the tab text color, but I do not see a similar method for QTabWidget.

Crucifixion answered 7/2, 2012 at 3:33 Comment(0)
T
6

The tab text color can be set via the tab-widget's tabBar method:

tabwidget.tabBar().setTabTextColor(index, color)
Tradesman answered 7/2, 2012 at 13:35 Comment(1)
Sorry, I hadn't checked the site for a while and didn't see your answer. Thanks!Crucifixion

© 2022 - 2024 — McMap. All rights reserved.