So, i create tabs with close button.
Connected close signal with close slot
connect(tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
connect(tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
To copy to clipboard, switch view to plain text mode
and here is the close slot:
void MainWindow::closeTab(int idx1)
{
tabWidget->removeTab(idx1);
}
void MainWindow::closeTab(int idx1)
{
tabWidget->removeTab(idx1);
}
To copy to clipboard, switch view to plain text mode

if i trying to close the second tab im reciving

so
if im trying to close the last tab, it works normally but if i close the second, all tabs after it are deleting too. What i do wrong??
Bookmarks