diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-03-09 01:45:04 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-03-09 01:45:04 (GMT) |
commit | 147b11193618c954f41625b469a113f202362468 (patch) | |
tree | af73f5081e20002fab7319a05ce5bccf48e6c302 /src/declarative/graphicsitems/qdeclarativeitem.cpp | |
parent | 9bd895158915313bb0ffae7fcfb24598cb1721fa (diff) | |
parent | 5fac3f48019263e8544edffb2dd053238d8670bf (diff) | |
download | Qt-147b11193618c954f41625b469a113f202362468.zip Qt-147b11193618c954f41625b469a113f202362468.tar.gz Qt-147b11193618c954f41625b469a113f202362468.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitem.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 59dd43d..9d6b2a0 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -2855,6 +2855,27 @@ bool QDeclarativeItem::heightValid() const return d->heightValid; } +/*! \internal */ +void QDeclarativeItem::setSize(const QSizeF &size) +{ + Q_D(QDeclarativeItem); + d->heightValid = true; + d->widthValid = true; + + if (d->height == size.height() && d->width == size.width()) + return; + + qreal oldHeight = d->height; + qreal oldWidth = d->width; + + prepareGeometryChange(); + d->height = size.height(); + d->width = size.width(); + + geometryChanged(QRectF(x(), y(), width(), height()), + QRectF(x(), y(), oldWidth, oldHeight)); +} + /*! \qmlproperty bool Item::wantsFocus |