7#include <QtQml/qtqmlglobal.h>
9#include <QtCore/qcontainerinfo.h>
10#include <QtCore/qlist.h>
11#include <QtCore/qmetatype.h>
12#include <QtCore/qvariant.h>
19#define QML_LIST_PROPERTY_ASSIGN_BEHAVIOR_APPEND Q_CLASSINFO("QML.ListPropertyAssignBehavior", "Append")
20#define QML_LIST_PROPERTY_ASSIGN_BEHAVIOR_REPLACE_IF_NOT_DEFAULT Q_CLASSINFO("QML.ListPropertyAssignBehavior", "ReplaceIfNotDefault")
21#define QML_LIST_PROPERTY_ASSIGN_BEHAVIOR_REPLACE Q_CLASSINFO("QML.ListPropertyAssignBehavior", "Replace")
71 return object ==
o.object &&
91 template<
typename List>
94 if constexpr (std::is_same_v<List, QList<T *>>) {
95 if (
append == qlist_append)
102 if constexpr (QContainerInfo::has_reserve_v<List>)
105 static_assert(QContainerInfo::has_push_back_v<List>);
135 if (idx < 0 || idx >=
length)
144 for (T *
item :
std::as_const(stash))
175 for (T *
item :
std::as_const(stash))
187#if QT_DEPRECATED_SINCE(6, 4)
201 bool isValid()
const;
206 bool canAppend()
const;
208 bool canClear()
const;
209 bool canCount()
const;
210 bool canReplace()
const;
211 bool canRemoveLast()
const;
213 bool isManipulable()
const;
214 bool isReadable()
const;
222 bool removeLast()
const;
232inline constexpr bool IsQmlListType<QQmlListProperty<T>> =
true;
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
qsizetype count() const noexcept
void reserve(qsizetype size)
void removeLast() noexcept
void append(parameter_type t)
The QQmlEngine class provides an environment for instantiating QML components.
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
QQmlListProperty(QObject *o, void *d, AppendFunction a, CountFunction c, AtFunction t, ClearFunction r)
Construct a QQmlListProperty from a set of operation functions append, count, at, and clear.
QQmlListProperty(QObject *o, void *d, AppendFunction a, CountFunction c, AtFunction t, ClearFunction r, ReplaceFunction s, RemoveLastFunction p)
Construct a QQmlListProperty from a set of operation functions append, count, at, clear,...
qsizetype(*)(QQmlListProperty< T > *) CountFunction
Synonym for {qsizetype (*)(QQmlListProperty<T> *property)}.
void(*)(QQmlListProperty< T > *, qsizetype, T *) ReplaceFunction
Synonym for {void (*)(QQmlListProperty<T> *property, qsizetype index, T *value)}.
QQmlListProperty(QObject *o, QList< T * > *list)
bool operator==(const QQmlListProperty &o) const
Returns true if this QQmlListProperty is equal to other, otherwise false.
QQmlListProperty()=default
\macro QML_LIST_PROPERTY_ASSIGN_BEHAVIOR_APPEND
void(*)(QQmlListProperty< T > *) ClearFunction
Synonym for {void (*)(QQmlListProperty<T> *property)}.
void(*)(QQmlListProperty< T > *, T *) AppendFunction
Synonym for {void (*)(QQmlListProperty<T> *property, T *value)}.
RemoveLastFunction removeLast
void(*)(QQmlListProperty< T > *) RemoveLastFunction
Synonym for {void (*)(QQmlListProperty<T> *property)}.
QQmlListProperty(QObject *o, void *d, CountFunction c, AtFunction a)
Construct a readonly QQmlListProperty from a set of operation functions count and at.
T *(*)(QQmlListProperty< T > *, qsizetype) AtFunction
Synonym for {T *(*)(QQmlListProperty<T> *property, qsizetype index)}.
The QQmlListReference class allows the manipulation of QQmlListProperty properties.
bool operator==(const QQmlListReference &other) const
Compares this QQmlListReference to other, and returns true if they are equal.
list append(new Employee("Blackpool", "Stephen"))
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define QT_DEPRECATED_X(text)