diff --git a/src/SideTabBar.cpp b/src/SideTabBar.cpp index 610e40b..3089983 100644 --- a/src/SideTabBar.cpp +++ b/src/SideTabBar.cpp @@ -110,6 +110,13 @@ CSideTabBar::CSideTabBar(CDockContainerWidget* parent, SideBarLocation area) : //============================================================================ CSideTabBar::~CSideTabBar() { + // The SideTabeBar is not the owner of the tabs and to prevent deletion + // we set the parent here to nullptr to remove it from the children + auto Tabs = findChildren(QString(), Qt::FindDirectChildrenOnly); + for (auto Tab : Tabs) + { + Tab->setParent(nullptr); + } delete d; }