本页内容

QWaylandShell Class

用于实现 Wayland 壳层的抽象类。更多内容...

头文件: #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

此枚举类型用于指定 Shell 界面的焦点策略。

常量值描述
QWaylandShell::AutomaticFocus0Shell 表面在创建时会自动获得键盘焦点。
QWaylandShell::ManualFocus1合成器将决定 shell 表面是否应获得键盘焦点。

属性文档

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.