XdgPopup QML Type
XdgPopup 表示 xdg 表面的弹出特定部分。更多
Import Statement: | import QtWayland.Compositor.XdgShell |
In C++: | QWaylandXdgPopup |
属性
- anchorEdges : enumeration
- anchorRect : rect
- configuredGeometry : rect
- flipConstraints : enumeration
- gravityEdges : rect
- offset : point
- parentXdgSurface : XdgSurface
- positionerSize : size
- resizeConstraints : enumeration
- slideConstraints : enumeration
- unconstrainedPosition : point
- xdgSurface : XdgSurface
方法
- int sendConfigure(rect geometry)
- void sendPopupDone()
详细说明
该类型是XdgShell 扩展的一部分,提供了一种方法来扩展XdgSurface 的功能,为 xdg 表面提供桌面风格菜单的特定功能。
它与 Wayland 界面xdg_popup
相对应。
属性文档
anchorEdges : enumeration |
此属性包含子曲面应相对于锚点矩形放置的边缘集。如果在一个方向上没有指定边缘,锚点应位于边缘之间的中心。
可能的值有
常量 | 说明 |
---|---|
Qt.TopEdge | 矩形的上边缘。 |
Qt.LeftEdge | 矩形的左边缘 |
Qt.RightEdge | 矩形的右边缘 |
Qt.BottomEdge | 矩形的下边缘。 |
anchorRect : rect |
相对于父窗口几何图形的锚点矩形,子表面应相对于父窗口几何图形放置。
configuredGeometry : rect |
弹出窗口在配置事件中接收到的窗口几何图形。相对于父表面的左上角。
flipConstraints : enumeration |
此属性保留子窗口翻转以适应屏幕的方向。
可能的值
常量 | 说明 |
---|---|
Qt.Horizontal | 水平 |
Qt.Vertical | 垂直 |
gravityEdges : rect |
指定曲面相对于锚点的定位方向。
可能的值有
常量 | 说明 |
---|---|
Qt.TopEdge | 曲面应向屏幕上方滑动。 |
Qt.LeftEdge | 曲面应向屏幕左侧滑动。 |
Qt.RightEdge | 曲面应向屏幕右侧滑动。 |
Qt.BottomEdge | 曲面应向屏幕底部滑动。 |
offset : point |
相对于锚点矩形上的锚点和曲面上的锚点的位置。
parentXdgSurface : XdgSurface |
此属性保存与此XdgPopup 的父对象相关联的XdgSurface 。
positionerSize : size |
定位器对象请求的窗口几何尺寸。
resizeConstraints : enumeration |
该属性包含子对象调整大小以适应屏幕的方向。
可能的值:
常量 | 说明 |
---|---|
Qt.Horizontal | 水平 |
Qt.Vertical | 垂直 |
slideConstraints : enumeration |
此属性用于设置子代在屏幕内滑动的方向。
可能的值
常数 | 说明 |
---|---|
Qt.Horizontal | 水平 |
Qt.Vertical | 垂直 |
unconstrainedPosition : point |
如果曲面不受约束,曲面相对于父窗口几何体的位置。即未移动以适应屏幕或类似位置时。
xdgSurface : XdgSurface |
此属性保存与此XdgPopup 相关的XdgSurface 。
方法文档
geometry 包含相对于父表面窗口几何图形左上角的窗口几何图形。
这也会向相应的XdgSurface 隐式发送一个配置事件。
void sendPopupDone() |
取消弹出窗口。根据xdg-shell
协议,客户端应销毁弹出窗口。
© 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.