PDA

View Full Version : Show and hide Tab page



fulin
27th March 2012, 12:13
Hi,

I know that we can hide a page of a Tab by



int page_index = 0;
ui->myTab->removeTab(page_index);


but how can I show this page again. There seems no such kind of function in Qt 4.7 Tab



int page_index = 0;
ui->myTab->showPage(page_index);


Thank you in advance

wysota
27th March 2012, 18:18
There is addTab()

ChrisW67
28th March 2012, 00:15
I know that we can hide a page of a Tab by
There's a difference between hiding something and removing it. As wysota says, there is addTab() (or insertTab()) but you will need to keep a pointer to the removed tab somewhere (and ensure its destruction if it is not in the tab widget).

fulin
28th March 2012, 09:43
Now I got it.

Thank you both!