diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-03-18 02:10:34 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-03-19 05:01:45 (GMT) |
commit | 79a02c86c445e50630bcae62a4505f212281ec8b (patch) | |
tree | 81cbdc86660b86bf17ce6373802f29483797c0a0 /src/gui | |
parent | 78e1a866ba5d594233db80f7aab88331db237d3a (diff) | |
download | Qt-79a02c86c445e50630bcae62a4505f212281ec8b.zip Qt-79a02c86c445e50630bcae62a4505f212281ec8b.tar.gz Qt-79a02c86c445e50630bcae62a4505f212281ec8b.tar.bz2 |
Add NOTIFY to size property so QML bindings are working fine.
Just add the notify + the signal.
Task-number:QTBUG-8277
Reviewed-by:yoann
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.cpp | 1 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.h | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 5e01785..b0a0ef0 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -391,6 +391,7 @@ void QGraphicsWidget::setGeometry(const QRectF &rect) QGraphicsSceneResizeEvent re; re.setOldSize(oldSize); re.setNewSize(newGeom.size()); + emit sizeChanged(); QApplication::sendEvent(this, &re); } } diff --git a/src/gui/graphicsview/qgraphicswidget.h b/src/gui/graphicsview/qgraphicswidget.h index f1d382b..56b5f88 100644 --- a/src/gui/graphicsview/qgraphicswidget.h +++ b/src/gui/graphicsview/qgraphicswidget.h @@ -73,7 +73,7 @@ class Q_GUI_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLay Q_PROPERTY(QPalette palette READ palette WRITE setPalette) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection RESET unsetLayoutDirection) - Q_PROPERTY(QSizeF size READ size WRITE resize) + Q_PROPERTY(QSizeF size READ size WRITE resize NOTIFY sizeChanged) Q_PROPERTY(QSizeF minimumSize READ minimumSize WRITE setMinimumSize) Q_PROPERTY(QSizeF preferredSize READ preferredSize WRITE setPreferredSize) Q_PROPERTY(QSizeF maximumSize READ maximumSize WRITE setMaximumSize) @@ -175,6 +175,9 @@ public: using QObject::children; #endif +Q_SIGNALS: + void sizeChanged(); + public Q_SLOTS: bool close(); |