27 Q_PROPERTY(QObject *object READ object CONSTANT FINAL)
28 Q_PROPERTY(QString name READ name CONSTANT FINAL)
30 enum PropertyTypeCategory {
46 QQmlProperty(QObject *);
47 QQmlProperty(QObject *, QQmlContext *);
48 QQmlProperty(QObject *, QQmlEngine *);
50 QQmlProperty(QObject *,
const QString &);
51 QQmlProperty(QObject *,
const QString &, QQmlContext *);
52 QQmlProperty(QObject *,
const QString &, QQmlEngine *);
54 QQmlProperty(
const QQmlProperty &);
55 QQmlProperty &operator=(
const QQmlProperty &);
57 QQmlProperty(QQmlProperty &&other)
noexcept : d(std::exchange(other.d,
nullptr)) {}
58 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QQmlProperty)
60 void swap(QQmlProperty &other)
noexcept { qt_ptr_swap(d, other.d); }
61 bool operator==(
const QQmlProperty &)
const;
65 bool isProperty()
const;
66 bool isSignalProperty()
const;
68 int propertyType()
const;
69 QMetaType propertyMetaType()
const;
70 PropertyTypeCategory propertyTypeCategory()
const;
71 const char *propertyTypeName()
const;
75 QVariant read()
const;
76 static QVariant read(
const QObject *,
const QString &);
77 static QVariant read(
const QObject *,
const QString &, QQmlContext *);
78 static QVariant read(
const QObject *,
const QString &, QQmlEngine *);
80 bool write(
const QVariant &)
const;
81 static bool write(QObject *,
const QString &,
const QVariant &);
82 static bool write(QObject *,
const QString &,
const QVariant &, QQmlContext *);
83 static bool write(QObject *,
const QString &,
const QVariant &, QQmlEngine *);
87 bool hasNotifySignal()
const;
88 bool needsNotifySignal()
const;
89 bool connectNotifySignal(QObject *dest,
const char *slot)
const;
90 bool connectNotifySignal(QObject *dest,
int method)
const;
92 bool isWritable()
const;
93 bool isBindable()
const;
94 bool isDesignable()
const;
95 bool isResettable()
const;
96 QObject *object()
const;
99 QMetaProperty property()
const;
100 QMetaMethod method()
const;
103 friend class QQmlPropertyPrivate;
104 QQmlPropertyPrivate *d =
nullptr;