菜单项类。
属性#
| 读取(get) | 写入(set) | 类型 | 名称 | 说明 |
|---|---|---|---|---|
| x | x | string | text | 显示文本 |
| x | x | bool | checked | 勾选状态 |
| x | x | bool | toggle | 切换状态 |
| x | x | bool | clickClose | 单击后关闭 |
| x | x | bool | separator | 分隔线 |
| x | string | systemSVGFile | 系统 .svg 文件名 |
方法#
| 成员 | 说明 |
|---|---|
| MenuItem | 构造函数。 |
| addClickEvent | 添加单击事件处理函数。 |
MenuItem([parent])#
构造函数。
- 参数:
MQWidget.WidgetBase parent - 父控件
addClickEvent(callback)#
添加单击事件处理函数。
- 参数:
function(sender) callback - 回调函数