Currently I have tried using the following:
def tabs_color(self):
...
...
for index in range(self.tab_bar.count()):
text = self.tab_bar.tabText(index)
color = QtCore.Qt.transparent.name if text in qmenu_items else
QtCore.Qt.red.name
# self.tab_bar.setTabTextColor(index, color)
self.tab_bar.setStyleSheet(
'''
QTabBar::tab {{}}
QTabBar::tab:selected {{background-color: {color};}}
'''.format(color=my_color)
)
There are 2 different issues that I am experiencing..
1. While the 'non-existent' tab(s) got highlighted with a red background,
as soon as I try to navigate to all the other tabs, the supposed
'non-existent' tab reverted back to its original background color while my
current tab selected instead got colored red.
2. Thought I had tried to use `setCurrentIndex` - navigate to each of the
tab followed by setting using `setStylesheet`, no tabs will be highlighted
and only the last tab will be considered?
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/beb36ea2-115f-453d-8444-ae436e00ffc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.