Solved Add icon to the tab when QDockWidget tabified
-
As known, we can add a icon to the tabs of QTabWidget. When QDockWidget tabified, it's very similar to a QTabWidget, but how to add icons to the tabs?
-
Hi,
There's no public API to access the QTabBars used in QMainWindow. So you would have to rely on a hack to do that. Basically find all QTabBar children of your QMainWindow and then find the one matching your QDockWidget and then modify it. Note that you might be going against the GUI guide lines of your platform. You should check them.
-
@SGaist Yes, I've 'hacked' that. For now, it works all well.