这就是:
代码在这里:
self.connectAction = createAction(
self, "设备连接(&C)", self.setupDevice,
icon_id = QStyle.SP_DialogNoButton)
这就是createAction:
def createAction(parent,
text,
slot=None,
shortcut=None,
icon=None,
tip=None,
checkable=False,
signal="triggered()",
whatis=None,
icon_id=None):
action = QAction(text, parent)
if icon:
if isinstance(icon, QIcon):
action.setIcon(icon)
else:
action.setIcon(QIcon(":/%s.png" % icon))
if icon_id:
action.setIcon(app.style().standardIcon(icon_id))
if slot:
connect(action, signal, slot)
return action
答案 0 :(得分:0)
好的,我发现了我的问题,我设置了qt样式表,导致了这个问题。