XdgToplevel QML Type

XdgToplevel 表示 xdg 曲面的顶层窗口特定部分。更多

Import Statement: import QtWayland.Compositor.XdgShell
In C++: QWaylandXdgToplevel

属性

方法

详细说明

该类型是XdgShell 扩展的一部分,提供了一种扩展XdgSurface 功能的方法,具有桌面风格窗口的特定功能。

它与 Wayland 接口xdg_toplevel 相对应。

属性文档

activated : bool [read-only]

该属性显示 toplevel 是否将自身绘制为具有输入焦点。


appId : string [read-only]

该属性显示XdgToplevel 的应用程序 ID。


decorationMode : enumeration [read-only]

该属性显示 toplevel 当前的窗口装饰模式。

可能的值有

常量说明
XdgToplevel.ServerSideDecoration合成器应绘制窗口装饰。
XdgToplevel.ClientSideDecoration客户端应绘制窗口装饰。

另请参阅 XdgDecorationManagerV1


fullscreen : bool [read-only]

此属性用于保存客户端是否已确认应全屏显示。


maxSize : size [read-only]

该属性保留客户端所要求的XdgToplevel 的最大尺寸。

合成器可自由忽略此值,并请求更大的尺寸。


maximized : bool [read-only]

此属性表示客户端是否已确认应最大化。


minSize : size [read-only]

此属性表示客户要求的XdgToplevel 的最小尺寸。

合成器可自由忽略此值,并请求更小的尺寸。


该属性显示 toplevel 是否会阻止其他窗口接收输入。

此属性在 Qt 6.8 中引入。


parentToplevel : XdgToplevel [read-only]

该属性显示XdgToplevelXdgToplevel 的父窗口。


resizing : bool [read-only]

该属性显示客户端是否承认正在调整大小。


title : string [read-only]

该属性显示XdgToplevel 的标题。


xdgSurface : XdgSurface [read-only]

该属性用于保存XdgToplevelXdgSurface


方法文档

void sendClose()

向客户端发送关闭事件。客户端可以选择忽略该事件。


int sendConfigure(size size, list<int> states)

size 包含曲面的像素大小。尺寸为 0 表示客户端可自由决定尺寸。已知的states 在 XdgToplevel::State 中枚举。


void sendFullscreen(size size)

方便发送已设置全屏状态、最大化和调整大小的配置事件。激活状态保持当前状态。

size 是窗口的新大小。

另请参阅 sendUnmaximized


void sendMaximized(size size)

方便发送已设置最大化状态、取消全屏和调整大小的配置事件。激活状态保持当前状态。

size 是窗口的新大小。


void sendResizing(size maxSize)

方便发送已设置大小调整状态并取消最大化和全屏状态的配置事件。激活状态保持当前状态。

maxSize 是窗口的新大小。


void sendUnmaximized(size size)

方便发送配置事件,同时删除最大化、全屏和调整大小状态,以及全屏和调整大小状态。激活状态保持当前状态。

size 是窗口的新大小。如果 为零,则由客户端决定大小。size


size sizeForResize(size size, point delta, uint edges)

方便计算新大小,给定当前size 、一个delta 和拖动中激活的edges


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