<QWaylandQuickExtension> - Qt Wayland Compositor Qt Quick Extension Macro Declarations

<QWaylandQuickExtension> 헤더 파일에는 QWaylandCompositorExtension 및 QWaylandObject 의 하위 클래스에 해당하는 Qt Quick 유형을 생성하기 위한 매크로가 포함되어 있습니다. 더 보기...

Header: #include <QWaylandQuickExtension>

매크로

자세한 설명

Qt Wayland Compositor 에 대한 확장 기능을 만드는 경우, QWaylandQuickExtension 헤더에 포함된 매크로를 사용하면 각 클래스에 필요한 부분을 수동으로 구현하는 대신 유용하게 활용할 수 있습니다.

‘사용자 정의 셸’항목도 참조하십시오 .

매크로 문서

Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(className)

이 매크로는 Wayland 확장을 기반으로 한 Qt Quick 클래스를 정의하는 데 사용할 수 있습니다. 이 매크로는 className 을 상속받고, 이름 뒤에 “QuickExtension”을 접미사로 붙이는 새로운 클래스를 정의합니다.

이 클래스는 ` QWaylandCompositorExtension`의 하위 클래스여야 하며, ` QWaylandCompositorExtension::initialize()`가 자동으로 호출됩니다. 이 타입은 ` qmlRegisterType()`를 사용하여 ` Qt Quick `에 수동으로 등록해야 합니다.

Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT도 참조하십시오 .

Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CONTAINER_CLASS(className)

이 매크로는 Wayland 확장 기능을 포함하도록 설계된 Qt Quick 클래스를 정의하는 데 사용할 수 있습니다.

이 매크로는 ` className `을 상속받으며 이름 끝에 "QuickExtensionContainer"를 접미사로 붙이는 새로운 클래스를 정의합니다. ` className `로 지정된 클래스는 ` QWaylandObject`을 상속받아야 하며, 새로운 클래스에는 ` extensions ` 속성이 있어 기본 클래스의 ` addExtension()` 및 ` removeExtension()`를 호출하여 확장 기능을 관리합니다.

이 타입은 qmlRegisterType()을 사용하여 Qt Quick 에 수동으로 등록해야 합니다.

[since 6.8] Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(className, QmlType)

이 매크로는 Wayland 확장을 기반으로 한 Qt Quick 클래스를 정의하는 데 사용할 수 있습니다. 이 매크로는 className 을 상속받으며, 이름 끝에 “QuickExtension”을 접미사로 추가하는 새로운 클래스를 정의합니다.

이 매크로는 ` Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS`과 동일하게 작동하지만, 현재 QML 모듈에서 새로운 유형을 ` QmlType `로 자동 등록합니다.

이 매크로는 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.