summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-08-12 12:31:24 (GMT)
committerJesper Thomschutz <jesper.thomschutz@nokia.com>2010-08-13 09:01:00 (GMT)
commitc12f452dc06a9a0dfb244dc5124cfca0b3973b0d (patch)
tree117247515a061a1ecf689c9993aed23ed5329b2d /src/gui
parentb004dad34039300abfc1058439f6c57063ea8080 (diff)
downloadQt-c12f452dc06a9a0dfb244dc5124cfca0b3973b0d.zip
Qt-c12f452dc06a9a0dfb244dc5124cfca0b3973b0d.tar.gz
Qt-c12f452dc06a9a0dfb244dc5124cfca0b3973b0d.tar.bz2
Properly emit geometryChanged() when the position change.
Also emit the signal at the very end, so people can rely on the resize event to adjust some stuff in their item. Reviewed-by:yoann (cherry picked from commit 3ee89bc0830f69d44f272eff5a0c886bff33c92e)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index c486c45..0fabd18 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -385,12 +385,12 @@ void QGraphicsWidget::setGeometry(const QRectF &rect)
if (wd->inSetPos) {
//set the new pos
d->geom.moveTopLeft(pos());
+ emit geometryChanged();
return;
}
}
QSizeF oldSize = size();
QGraphicsLayoutItem::setGeometry(newGeom);
- emit geometryChanged();
// Send resize event
bool resized = newGeom.size() != oldSize;
if (resized) {
@@ -403,6 +403,7 @@ void QGraphicsWidget::setGeometry(const QRectF &rect)
emit heightChanged();
QApplication::sendEvent(this, &re);
}
+ emit geometryChanged();
}
/*!