Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.12.5
-
None
Description
QTabWidget::removeTab removes 2 tabs (instead of 1) in almost all cases. Only when the last tab is removed, the function works correct and only 1 tab is removed.
For example:
QTabWidget* pTabWidget = new QTabWidget(); pTabWidget->addTab(new QWidget(), "1"); pTabWidget->addTab(new QWidget(), "2"); pTabWidget->addTab(new QWidget(), "3"); pTabWidget->addTab(new QWidget(), "4"); delete pTabWidget->widget(1); pTabWidget->removeTab(1); //This removes tab "2" and "3", which is incorrect delete pTabWidget->widget(pTabWidget->count() - 1); pTabWidget->removeTab(pTabWidget->count() - 1); //This removes only tab "4", which is correct