diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-08 17:15:55 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-08 17:15:55 +0200 |
commit | 3e71810cf3153e4331fc075a73b6408adcf33654 (patch) | |
tree | 9f5fbb7a5dc2a902b380dd69a222c0f2cd6eb760 /src/widgets/graphicsview/qgraphicswidget.cpp | |
parent | 6feec9da93032d11a768802ac2187d9d4153b1ec (diff) | |
parent | ebd1046323615f22192055a94438bf85fc360ca3 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/network/access/qhttpnetworkconnection.cpp
src/network/access/qhttpnetworkconnection_p.h
Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
Diffstat (limited to 'src/widgets/graphicsview/qgraphicswidget.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicswidget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp index d52aff5131..e1ba3759e0 100644 --- a/src/widgets/graphicsview/qgraphicswidget.cpp +++ b/src/widgets/graphicsview/qgraphicswidget.cpp @@ -274,6 +274,11 @@ QGraphicsWidget::~QGraphicsWidget() // Remove this graphics widget from widgetStyles widgetStyles()->setStyleForWidget(this, 0); + + // Unset the parent here, when we're still a QGraphicsWidget. + // It is otherwise done in ~QGraphicsItem() where we'd be + // calling QGraphicsWidget members on an ex-QGraphicsWidget object + setParentItem(Q_NULLPTR); } /*! |