[Solved]Hide a tab widget from QTabWidget
-
I'm trying to hide a tab bar from QTabWidget :
@
QTabWidget* tabWidget = new QTabWidget;
QWidget* hiddenTab = new QWidget;
tabWidget->addTab( hiddenTab, "Hidden Tab" );
hiddenTab->hide();
tabWidget->addTab( new QWidget, "Start" );
@but this solution doesn't work for me, I need that because I want my app to look like :
"http://img690.imageshack.us/img690/2327/testhz.jpg":http://img690.imageshack.us/img690/2327/testhz.jpg
How to do that? Thanks in advance !!!
[edit: link added / Denis Kormalev]
[edit: fixed @ tag / chetankjain] -
do you plan to show the hiddenTab later in your program? or is it just to provide spacing on the left?
if its just to provide spacing to the left, you can set a stylesheet to it as follows:
@
QTabWidget::tab-bar {
left: 50px; /* move to the right by 50px */
}
@ -
I'm not going to use or show the hiddenTab, it's just about spacing
-
then use the stylesheet as shown, it looks exactly like how you want it. you don't have to create a dummy tab which you won't use anyways
-
Yes, It's working, thanks for help :)
-
cool :)