setTabsClosable(true) with exception to one?
SRaD last edited by
I have a QTabWidget with several tabs and I've setTabsClosable() and connected the TabCloseRequested() signal to a slot.
mainTabs = new QTabWidget; mainTabs->setTabBarAutoHide(true); mainTabs->setTabsClosable(true); // ... connect(mainTabs, &QTabWidget::tabCloseRequested, this, &MainWindow::closeTabs);
All of the tabs show an X so that I can click it on the tab of choice and it will close.
However, I'd like to know if there is one tab (at my index 0) that can be set to where no X will show as I must have at the very least this one tab always showing. It must not be allowed to close or show the X.
Anyone have ideas?
nagesh last edited by
This below line will get the tabbutton from the tabbar at index 0 and hides it.