diff options
author | Paolo Angelelli <paolo.angelelli.qt@gmail.com> | 2019-12-26 21:24:29 +0100 |
---|---|---|
committer | paolo <paolo.angelelli.qt@gmail.com> | 2020-01-18 14:38:50 +0100 |
commit | 8e53b4913946801f5ba51807feda21778f264bf0 (patch) | |
tree | bc0dd78486cd79b38c6be29b43a391ee8747d2fb /src/location/declarativemaps/qparameterizableobject_p.h | |
parent | 1bba966b8df1cc1d39276833ff4533f967df247e (diff) | |
download | qtlocation-8e53b4913946801f5ba51807feda21778f264bf0.tar.gz |
Add parent property to QParametrizableObject
Also emitting signals when the parent is changed internally
(e.g., in a MapObjectView).
Not revisioning it since it is used both in QtLocation
and in Qt.labs.location, and setting it to 15 would break
the property in map objects.
Change-Id: Ib11b18b7fcc507b5a11481f84f2bf0bd8c9f558e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qparameterizableobject_p.h')
-rw-r--r-- | src/location/declarativemaps/qparameterizableobject_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qparameterizableobject_p.h b/src/location/declarativemaps/qparameterizableobject_p.h index e450c6ec..cf393aee 100644 --- a/src/location/declarativemaps/qparameterizableobject_p.h +++ b/src/location/declarativemaps/qparameterizableobject_p.h @@ -58,6 +58,7 @@ class QGeoMapParameter; class Q_LOCATION_PRIVATE_EXPORT QParameterizableObject : public QObject { Q_OBJECT + Q_PROPERTY(QObject *parent READ parent NOTIFY parentChanged DESIGNABLE false FINAL) Q_PROPERTY(QQmlListProperty<QObject> quickChildren READ declarativeChildren DESIGNABLE false) Q_CLASSINFO("DefaultProperty", "quickChildren") @@ -76,6 +77,9 @@ public: return res; } +Q_SIGNALS: + void parentChanged(); + protected: virtual void appendChild(QObject *v); virtual void clearChildren(); |