在本页

QWaylandShell Class

实现 wayland shell 的抽象类。更多

头文件: #include <QWaylandShell>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
在 QML 中: Shell
继承: QWaylandCompositorExtension

公共类型

enum FocusPolicy { AutomaticFocus, ManualFocus }

属性

公共功能

QWaylandShell::FocusPolicy focusPolicy() const
void setFocusPolicy(QWaylandShell::FocusPolicy focusPolicy)

信号

详细说明

成员类型文档

enum QWaylandShell::FocusPolicy

此枚举类型用于指定壳表面的聚焦策略。

常量说明
QWaylandShell::AutomaticFocus0贝壳表面在创建时会自动获得键盘焦点。
QWaylandShell::ManualFocus1合成器将决定外壳表面是否应获得键盘焦点。

属性文档

focusPolicy : FocusPolicy

该属性保存QWaylandShell 的焦点策略。

访问功能:

QWaylandShell::FocusPolicy focusPolicy() const
void setFocusPolicy(QWaylandShell::FocusPolicy focusPolicy)

通知信号:

void focusPolicyChanged()

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