Well, one thing that is definitely wrong is creation of the groupbox every time.
Also missing the call to delete the layout.
As for qDeleteAll(), since you have a vector of vectors, you'll need to iterate over the outer vector and call qDeleteAll on each element.
qDeleteAll() iterates over that inner vector then an calls delete on each element.
Cheers,
_
Bookmarks