The populateLayout() function adds parent-less QGraphicsWidgets (RectItems) to the layout. If the layout had a graphics-widget parent, it would reparent the items added to it onto the parent. But it didn't, so it didn't. Therefore, the last part of the test function (as denoted by the re-creation of `layout`) leaked a lot of items, including `layout`. To fix, give the layout the existing graphics-widget parent. Then the layout itself isn't leaked anymore, either. Amends the start of the public history. Essentially the same commit for columnCount() that b9836518a367a31a48027a5bf81c4973b847b442 was for rowCount(). Pick-to: 6.8 6.5 5.15 Change-Id: Ic38dfccfa41049d96eb0cf5811271ac17f2b1f91 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit d21434d1876fc778aa5dea6696b145bd6d86d03c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%