diff options
Diffstat (limited to 'src/lib.cpp')
-rw-r--r-- | src/lib.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib.cpp b/src/lib.cpp index 2815863..2290472 100644 --- a/src/lib.cpp +++ b/src/lib.cpp @@ -11,3 +11,12 @@ AssignmentList *getMainWindow() { return mainWin; return nullptr; } + +void recursiveClear(QLayout *layout) { + QLayoutItem *child; + while((child = layout->takeAt(0)) != nullptr) { + if(child->layout()) recursiveClear(child->layout()); + delete child->widget(); + delete child; + } +} |