I've run into a problem. I have a QTabWidget inside a QDockWidget. My QMainWindow class allows for tabified QDockWidgets. My problem is setting the style sheet for the QTabBar and QTabWidget. I want to style the QDockWidget tabs differently but the QTabWidget inside the QDockWidget uses both the style I set for the QDockWidget it is in as well as the style sheet I set for it.

I thought I may be able to correct this behavior if I reclassed the QTabBar the QMainWindow class uses for tabified QDockWidgets, however I cannot find a way the QMainWindow class creates it. There is a QTabBar that shows as one of the children of my QMainWindow class.

By reclassing the classes I would be able to use the new variable name for the style sheets and I think this would prevent my overrun problem. Without it I am stuck using the base QTabBar as a style sheet reference.

Can anyone help with this? Perhaps there is another way to style the QDockWidget tabs seperately from a contained QTabWidget.