summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget_p.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp
index 50b315a..076e8626 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.cpp
+++ b/src/gui/graphicsview/qgraphicswidget_p.cpp
@@ -879,6 +879,18 @@ void QGraphicsWidgetPrivate::resetHeight()
q->setGeometry(QRectF(q->x(), q->y(), width(), 0));
}
+void QGraphicsWidgetPrivate::setGeometryFromSetPos()
+{
+ if (inSetGeometry)
+ return;
+ Q_Q(QGraphicsWidget);
+ inSetPos = 1;
+ // Ensure setGeometry is called (avoid recursion when setPos is
+ // called from within setGeometry).
+ q->setGeometry(QRectF(pos, q->size()));
+ inSetPos = 0 ;
+}
+
QT_END_NAMESPACE
#endif //QT_NO_GRAPHICSVIEW