diff options
-rw-r--r-- | src/declarative/widgets/graphicslayouts.cpp | 4 | ||||
-rw-r--r-- | src/declarative/widgets/graphicslayouts.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/widgets/graphicslayouts.cpp b/src/declarative/widgets/graphicslayouts.cpp index 35f1e35..34d18e4 100644 --- a/src/declarative/widgets/graphicslayouts.cpp +++ b/src/declarative/widgets/graphicslayouts.cpp @@ -148,7 +148,7 @@ void QGraphicsLinearLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt: } QHash<QGraphicsLayoutItem*, QObject*> QGraphicsLinearLayoutObject::attachedProperties; -QObject *QGraphicsLinearLayoutObject::qmlAttachedProperties(QObject *obj) +LinearLayoutAttached *QGraphicsLinearLayoutObject::qmlAttachedProperties(QObject *obj) { // ### This is not allowed - you must attach to any object if (!qobject_cast<QGraphicsLayoutItem*>(obj)) @@ -308,7 +308,7 @@ qreal QGraphicsGridLayoutObject::spacing() const } QHash<QGraphicsLayoutItem*, QObject*> QGraphicsGridLayoutObject::attachedProperties; -QObject *QGraphicsGridLayoutObject::qmlAttachedProperties(QObject *obj) +GridLayoutAttached *QGraphicsGridLayoutObject::qmlAttachedProperties(QObject *obj) { // ### This is not allowed - you must attach to any object if (!qobject_cast<QGraphicsLayoutItem*>(obj)) diff --git a/src/declarative/widgets/graphicslayouts.h b/src/declarative/widgets/graphicslayouts.h index ab8ad90..13811eb 100644 --- a/src/declarative/widgets/graphicslayouts.h +++ b/src/declarative/widgets/graphicslayouts.h @@ -82,7 +82,7 @@ public: QmlList<QGraphicsLayoutItem *> *children() { return &_children; } - static QObject *qmlAttachedProperties(QObject *); + static LinearLayoutAttached *qmlAttachedProperties(QObject *); private Q_SLOTS: void updateStretch(QGraphicsLayoutItem*,int); @@ -124,6 +124,7 @@ private: // -fixed/min/max/preferred width // -spacing // -stretch +class GridLayoutAttached; class QGraphicsGridLayoutObject : public QObject, public QGraphicsGridLayout { Q_OBJECT @@ -142,7 +143,7 @@ public: qreal spacing() const; - static QObject *qmlAttachedProperties(QObject *); + static GridLayoutAttached *qmlAttachedProperties(QObject *); private: friend class GraphicsLayoutAttached; |