The test function creates a bunch of QGraphicsWidgets without parents, and adding them to the QGraphicsGridLayout doesn't make them owned by it. Besides, the layout was without a parent itself, so all these objects were leaked. To fix, give the layout a stack-allocated QGraphicsWidget parent. Now, the layout will reparent the widgets added to it to its own parent widget, which will delete layout and child widgets when it itself is deleted on all exists from the test function. Amends the start of the public history. Pick-to: 6.8 6.5 5.15 Change-Id: I8d80713f4ff6b1055bc396d855f98bc1873aee3b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit fe0b29a45c19ad401ab5e4d17bec2e2d3e2c618c) 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%