[Solved] Show/Hide sub-tab on QTabWidget
-
Assuming I have a QTabWidget that contains 5 sub-tabs. Now I want to show/hide a sub-tab in one of 5 sub-tabs by following code
@ui->twListTabs->widget(0)->hide(); // Hide first sub-tab@
But this didn't work for me. Do you have any solutions?
Thanks!
-
AFAIK you can only use
@
ui->twListTabs->removeTab(0);
@ -
I tried to use removeTab() to hide tabs. So how can I restore that tab to show?
-
How about addTab or insertTab?
-
Okay, I see. Thanks for your recommendation! :)