How to hide tabbar in tabwidget if only have one tab?
How to hide tabbar in tabwidget if only have one tab?
Im trying to use
ui->tabWidget->tabBar()->hide();
and gives that error:
error: C2248: 'QTabWidget::tabBar' : cannot access protected member declared in class 'QTabWidget'
What is the wrong thing here?
So is there any way to change visibility of tab bar completely?
Sure there is. Subclass QTabWidget and provide a public method that will call tabBar()->hide().
Bookmarks