- Qt 6.7
- Qt QML
- C++ Classes
- QQmlListReference
- Qt 6.7.1 Reference Documentation

# Obsolete Members for QQmlListReference

The following members of class QQmlListReference are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(since 6.1, deprecated)` | QQmlListReference(const QVariant &variant, QQmlEngine *engine)
`(deprecated)` | QQmlListReference(QObject *object, const char *property, QQmlEngine *engine)

## Member Function Documentation

### `[since 6.1, deprecated]` QQmlListReference::QQmlListReference(const QVariant &variant, QQmlEngine *engine)

This function is deprecated. We strongly advise against using it in new code.

Use the constructors without QQmlEngine argument instead.

Constructs a QQmlListReference from a QVariant variant containing a QQmlListProperty. If variant does not contain a list property, an invalid QQmlListReference is created. If the object owning the list property is destroyed after the reference is constructed, it will automatically become invalid. That is, it is safe to hold QQmlListReference instances even after the object is deleted.

The engine is unused.

This function was introduced in Qt 6.1.

### `[deprecated]` QQmlListReference::QQmlListReference(QObject *object, const char *property, QQmlEngine *engine)

This function is deprecated. We strongly advise against using it in new code.

Use the constructors without QQmlEngine argument instead.

Constructs a QQmlListReference for object's property. If property is not a list property, an invalid QQmlListReference is created. If object is destroyed after the reference is constructed, it will automatically become invalid. That is, it is safe to hold QQmlListReference instances even after object is deleted.

The engine is unused.