Unsolved Prevent QTabWidget from painting grey background box on macOS?
-
I am trying to prevent QTabWidget from printing the grey background box on macOS. I will eventually restyle the QTabBar as well and want this whole widget to be flat.
Ideas?
Thanks!
-
Hi,
One way would be to use a style sheet since you are going to re-style the rest of the widget.
-
Yes, I am having trouble figuring out what the css element would be for that.
-
Apply it on the widget you insert into the tab widget.
-
Tried disabling automatic background filling?
-
@kshegunov It looks like auto background filling is disabled by default for both QTabWidget and the pane widgets that are added for each tab.
@SGaist I think this is painted by QTabWidget and not part of the sub-widgets (see screenshot):
-
@patrickkidd said in Prevent QTabWidget from painting grey background box on macOS?:
I think this is painted by QTabWidget and not part of the sub-widgets (see screenshot)
You can test that. If you create an empty tab widget (without any widgets in it) you would observe the differences in colors if the tab widget is responsible, otherwise the panes are responsible for it (or both the tab widget and the panes). Also you could try to get the palette from the main window and set it to the tab widget, albeit it seems rather unlikely that'd help.