Avoid double delete of TabWidget
QLayout::addWidget sets the parent to the layout. The widget is always added to a layout or manually managed, it doesn't need any manual code.
QLayout::addWidget sets the parent to the layout. The widget is always added to a layout or manually managed, it doesn't need any manual code.