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)
# 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?