Obsolete Members for QQmlListReference

以下成员源于类 QQmlListReference 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(弃用) QQmlListReference (const QVariant & variant , QQmlEngine * engine )
(弃用) QQmlListReference (QObject * object , const char * property , QQmlEngine * engine )

成员函数文档编制

[since 6.1] 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 包含 QQmlListProperty 。若 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.

该函数在 Qt 6.1 引入。

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 。若 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 被删除。

The engine is unused.