Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.1, 4.7.1
-
None
-
Qt 4.6.1 and Qt 4.7.1 with Windows 7 and MSVC 9.0
-
794140fb86b470821e3a298a0ba9c8dbbee202b9 (qt/qtbase/5.12)
Description
We have found a corner case with QGraphicsProxyWidget where you can cause a crash when setting the proxied widget. I have attached an example program that can easily be converted to a regression test, and a patch to fix the issue.
The basic repo is the following:
- Create a parent and child QGraphicsProxyWidget
- Connect the two items using setParentItem()
- Call setWidget() on the parent with an initial widget.
- Later call setWidget() again with a new widget for the parent.
A crash occurs because a proxied widget has not been assigned to the child QGraphicsProxyWidget yet.