FAQ Database Discussion Community


How to prevent tab buttons from shrinking in QTabWidget

qt,tabs,qt5,qtabwidget,qtabbar
How do I prevent the tab buttons of a Qt5 QTabWidget from shrinking, thus obscuring the full tab names, when I shrink the containing window? Here's a self-contained example of the problem: #include <QApplication> #include <QMainWindow> #include <QtGui> #include <QTableWidget> QTableWidget* makeTableWidget( QWidget* parent ) { QTableWidget* tableWidget = new...

Inline renaming of a tab in QTabBar/QTabWidget

c++,qt,qtabwidget,qtabbar
I really want to have a QTabWidget that can be renamed by double-click on tab caption. I have googled and found this solution, but it's more like an outline for a developer who knows his way through Qt and subclassing it's widgets. I'm kind of stuck how to implement all...