pyqt icon overlap with word
This is what happens:
code here:
self.connectAction = createAction(
self, "设备连接(&C)", self.setupDevice,
icon_id = QStyle.SP_DialogNoButton)
and this the 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.se开发者_如何学GotIcon(app.style().standardIcon(icon_id))
if slot:
connect(action, signal, slot)
return action
OK, I found my problem, I set qt stylesheet, and it cause this problem.
精彩评论