あなたはサブコントロールを探していQTabBar::tab
ます。
#!/usr/bin/env python
#-*- coding:utf-8 -*-
from PyQt4 import QtGui, QtCore
class MyWindow(QtGui.QTabWidget):
def __init__(self, parent=None):
super(MyWindow, self).__init__(parent)
self.setStyleSheet("""
QTabBar::tab {
color: #FF0000;
}
""")
for tabNumber in range(3):
widget = QtGui.QLabel(self)
widget.setText("This is widget #{0}".format(tabNumber))
self.addTab(widget, "Tab {0}".format(tabNumber))
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
app.setApplicationName('MyWindow')
main = MyWindow()
main.show()
sys.exit(app.exec_())