QTabWidget: Unable to create a label on the tabbar to display tab name

40 Views Asked by At

I need to create a tabbar as shown in this image. I am able to create the tabs with only the icons and switch between them. However I am not able to create a QLabel in the tabbar to display the current selected tabname in the Qlabel.

Tab bar design

I am using the below code to add the label to the tabWidget, however the label does not show up when I run the code.

tabName = new QLabel("Settings",(QWidget *)ui->tabWidget);
tabName->setFixedWidth(300);
0

There are 0 best solutions below