Obsolete Members for <QWaylandQuickExtension>

<QWaylandQuickExtension> 类的以下成员已被废弃。提供这些成员是为了确保旧源代码能够继续运行。我们强烈建议不要在新代码中使用它们。

宏

(deprecated in 6.8) Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_CLASS(className, QmlType)

宏文档

[deprecated in 6.8] Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_CLASS(className, QmlType)

自 6.8 版本起,该宏已被废弃。我们强烈建议不要在新代码中使用它。

请改用 `Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT `。

该宏可用于基于 Wayland 扩展定义一个 `Qt Quick ` 类。它会定义一个继承自 `className ` 的新类,并在类名后添加“QuickExtension”后缀。

该宏的工作原理与 `Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS` 相同,但还会自动将新类型作为 `QmlType ` 注册到当前的 QML 模块中,并将 `QML_ADDED_IN_VERSION ` 设置为 1.0。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.