By default QTabWidget tab's don't have icons, you might have added it, just avoid adding it.
You can sub-class QTabWidget and implement the below virtual method, it will set the QLabel on to the tab of the newly added tab page(widget)
void myTabWidget::tabInserted(int index)
{
setTabText
(index,
QString());
//clear the title in the tab, if you want
label
->setFont
(QFont("Arial",
48,
100,
true));
tabBar
()->setTabButton
(index,
QTabBar::LeftSide, label
);
}
void myTabWidget::tabInserted(int index)
{
QString text = tabText(index);
setTabText(index, QString()); //clear the title in the tab, if you want
QLabel * label = new QLabel(text);
label->setFont(QFont("Arial", 48, 100, true));
tabBar()->setTabButton(index, QTabBar::LeftSide, label);
}
To copy to clipboard, switch view to plain text mode
Bookmarks