Hide label text for Qt tabs without setting text to empty string
I need a QTabWidget with icons only: How can I hide the label text of a tab in Qt? I cannot set the text to an empty string ( "" ), as I am using docked widgets ( QDockWidget ) and the label text is set automatically (and I need it if the widget is floating). But in tabbed mode I just want to display the icons (of the tabs). Possible approaches: Font size to 0? I need to create my own bar class and override the paint event as here Anything easier / cleaner? --- Edit --- Ok, the "set window title to empty string, and reset it the original text" approach works. I am using the topLevelChanged