Use setCurrentIndex(int index) the index of the new tab is the return value of addTab see the next code:
Qt Code:
myTabBar->setCurrentIndex(myTabBar->addTab("Some title"));To copy to clipboard, switch view to plain text mode
if you use a tabwidget you can also use setCurrentWidget(QWidget *widget)




Reply With Quote

Bookmarks