From 57d25d03f0a53be4cca6d20dcce0e5f2f9eecc45 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 31 May 2010 13:37:23 +1000 Subject: Fix example --- examples/declarative/cppextensions/qgraphicslayouts/layoutitem/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/main.cpp b/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/main.cpp index ef927d1..20a83e7 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/main.cpp +++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/main.cpp @@ -64,7 +64,7 @@ int main(int argc, char* argv[]) //Add the QML snippet into the layout QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl(":layoutItem.qml")); + QDeclarativeComponent c(&engine, QUrl(":layoutitem.qml")); QGraphicsLayoutItem* obj = qobject_cast(c.create()); layout->addItem(obj); -- cgit v0.12 From 51aed62ef08f1ffacce71d44612abe46b8344923 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Mon, 31 May 2010 13:35:48 +1000 Subject: Add notifier for PathPercent.value --- src/declarative/graphicsitems/qdeclarativepath.cpp | 5 ++++- src/declarative/graphicsitems/qdeclarativepath_p.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp index 2d08c7c..141a938 100644 --- a/src/declarative/graphicsitems/qdeclarativepath.cpp +++ b/src/declarative/graphicsitems/qdeclarativepath.cpp @@ -867,6 +867,9 @@ qreal QDeclarativePathPercent::value() const void QDeclarativePathPercent::setValue(qreal value) { - _value = value; + if (_value != value) { + _value = value; + emit changed(); + } } QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h index 17a2ea3..dad43e6 100644 --- a/src/declarative/graphicsitems/qdeclarativepath_p.h +++ b/src/declarative/graphicsitems/qdeclarativepath_p.h @@ -175,7 +175,7 @@ private: class Q_DECLARATIVE_EXPORT QDeclarativePathPercent : public QDeclarativePathElement { Q_OBJECT - Q_PROPERTY(qreal value READ value WRITE setValue) + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed) public: QDeclarativePathPercent(QObject *parent=0) : QDeclarativePathElement(parent) {} -- cgit v0.12