<QWaylandQuickExtension> - Qt Wayland Compositor Qt Quick Extension Macro Declarations
Il file di intestazione <QWaylandQuickExtension> include macro per la creazione di tipi di tipo “ Qt Quick ” corrispondenti alle sottoclassi di QWaylandCompositorExtension e QWaylandObject. Altro...
| Header: | #include <QWaylandQuickExtension> |
Macro
| Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(className) | |
| Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CONTAINER_CLASS(className) | |
(since 6.8) | Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(className, QmlType) |
Descrizione dettagliata
Se si stanno creando estensioni per Qt Wayland Compositor, le macro presenti nell'intestazione QWaylandQuickExtension possono rappresentare un'utile alternativa all'implementazione manuale delle parti richieste per ciascuna classe.
Vedi anche Shell personalizzata.
Documentazione sulle macro
Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(className)
Questa macro può essere utilizzata per definire una classe Qt Quick basata su un’estensione Wayland. Definisce una nuova classe che eredita da className e alla quale viene aggiunto il suffisso "QuickExtension" al nome.
La classe deve essere una sottoclasse di ` QWaylandCompositorExtension` e il metodo ` QWaylandCompositorExtension::initialize()` verrà chiamato automaticamente. Il tipo deve essere registrato manualmente in ` Qt Quick ` utilizzando ` qmlRegisterType()`.
Vedi anche Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT.
Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CONTAINER_CLASS(className)
Questa macro può essere utilizzata per definire una classe ` Qt Quick ` destinata a contenere estensioni Wayland.
Definisce una nuova classe che eredita da ` className ` e a cui viene aggiunto il suffisso "QuickExtensionContainer" al nome. La classe specificata da ` className ` deve ereditare da ` QWaylandObject`, e la nuova classe avrà una proprietà ` extensions ` che gestisce le estensioni chiamando ` addExtension()` e ` removeExtension()` nella classe base.
Il tipo deve essere registrato manualmente in Qt Quick utilizzando qmlRegisterType().
[since 6.8] Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(className, QmlType)
Questa macro può essere utilizzata per definire una classe di tipo “ Qt Quick ” basata su un’estensione Wayland. Definisce una nuova classe che eredita da “ className ” e alla cui denominazione aggiunge il suffisso “QuickExtension”.
La macro funziona allo stesso modo di ` Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS`, ma registra automaticamente il nuovo tipo come ` QmlType ` nel modulo QML corrente.
Questa macro è stata introdotta in Qt 6.8.
© 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.