本页内容

QWaylandResource Class

QWaylandResource 是wl_resource 的容器。更多内容...

头文件: #include <QWaylandResource>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor

公共函数

QWaylandResource()
QWaylandResource(wl_resource *resource)
wl_resource *resource() const

详细说明

QWaylandResource 是 Wayland 类型 `wl_resource` 的一个简单封装,它使得在 `Qt Quick ` API 中使用 `wl_resource` 指针成为可能。

另请参阅 “自定义 Shell”。

成员函数文档

QWaylandResource::QWaylandResource()

构建了一个无效的 QWaylandResource。resource() 访问器将返回 null。

[explicit] QWaylandResource::QWaylandResource(wl_resource *resource)

创建一个包含resource 的QWaylandResource。

wl_resource *QWaylandResource::resource() const

返回此QWaylandResource 所持有的wl_resource指针。

© 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.