pyqt图标与单词重叠

时间:2010-11-24 01:59:20

标签: pyqt

这就是:

alt text

代码在这里:

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

1 个答案:

答案 0 :(得分:0)

好的,我发现了我的问题,我设置了qt样式表,导致了这个问题。