Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.4, 5.13.2
-
None
-
322e5b7f5e35db73f7d7730a6fff558e153ad356 (qt/qtbase/5.15)
Description
I think there is a mistake in the section QLayoutItem * QLayout::takeAt(int index) [pure virtual] of the page QLayout Class Reference.
The example read as follows:
QLayoutItem *child;
while ((child = layout->takeAt(0)) != 0)
That code snippet doesn't actually delete the item from the layout.
To delete the item from the layout you need to add delete child->widget().
This is happening at least with QVBoxLayout.