脚本与 Python API

MQWidget.Popup · 弹出菜单

本页目录
  1. 属性
  2. 方法
  3. Popup([parent])
  4. getPreferredSidePosition(base_widget, horz)
  5. showPopup(screen_x, screen_y)

弹出窗口类。

父类: MQWidget.WidgetBase - MQWidget.WindowBase

属性#

读取(get) 写入(set) 类型 名称 说明
x x bool shadow 是否显示阴影
x x bool overlay 是否叠加显示

方法#

成员 说明
Popup 构造函数。
getPreferredSidePosition 获取控件侧边的位置。
showPopup 在指定位置显示弹出窗口。

Popup([parent])#

构造函数。

参数:
MQWidget.WindowBase parent - 父窗口

getPreferredSidePosition(base_widget, horz)#

获取控件侧边的位置。

参数:
MQWidget.WidgetBase base_widget - 侧边控件
bool horz - 水平方向
[True] 左侧或右侧
[False] 上方或下方
返回值:
list{int,int,int,int} - 包含宽度和高度的列表

showPopup(screen_x, screen_y)#

在指定位置显示弹出窗口。

参数:
int screen_x - 屏幕 X 坐标
int screen_y - 屏幕 Y 坐标
输入关键词,查找手册中的内容。