PDA

View Full Version : hide tabbar



wirasto
5th January 2010, 19:20
How to hide tabbar in tabwidget if only have one tab?

wysota
5th January 2010, 19:26
Did you try tabBar()->hide()?

tolgatuna_09
12th August 2013, 11:14
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?

wysota
12th August 2013, 14:25
tabBar() is a protected method, you cannot call it from outside QTabWidget class.

tolgatuna_09
10th June 2014, 08:18
So is there any way to change visibility of tab bar completely?

wysota
10th June 2014, 08:26
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().