Hi, QTabwidget::clear() removes all tabs. You might want to delete them, too.
Ginsengelf
It will cause memory leak.
Originally Posted by Qt Documentaion
void QTabWidget::clear()
Removes all the pages, but does not delete them. Calling this function is equivalent to calling removeTab() until the tab widget is empty.
Why not just remove the tabs and delete them, may not be huge number of them.
When you know how to do it then you may do it wrong. When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
Bookmarks