1、介绍
动作。这是QMenu添加的项,或者QMenuBar组件直接添加。
2、类和初始化
class QAction(__PyQt5_QtCore.QObject):
"""
QAction(parent: QObject = None)
QAction(str, parent: QObject = None)
QAction(QIcon, str, parent: QObject = None)
"""
def __init__(self, *__args):
pass
3、属性
AboutQtRole = 3
AboutRole = 4
ApplicationSpecificRole = 2
HighPriority = 256
Hover = 1
LowPriority = 0
NormalPriority = 128
NoRole = 0
PreferencesRole = 5
QuitRole = 6
TextHeuristicRole = 1
Trigger = 0
4、方法
(1)text
- 获取文本,即动作项的显示字符串。返回类型str
(2)setText
- 设置文本,参数类型str
5、事件
标签:__,None,parent,QAction,pyqt5,QObject,str From: https://www.cnblogs.com/wd404/p/17324486.html