def createAction(self, text, tooltip, icon):
action = QtGui.QAction(text, self)
action.setToolTip(tooltip)
action.setStatusTip(tooltip)
action.setIcon(QtGui.QIcon(icon))
#action.setIcon(QtGui.QIcon(__currentPath__ + "/data/img/" + icon))
return action
#def getMainWindow(self):
#toplevel = QtGui.qApp.topLevelWidgets()
#for i in toplevel:
#if i.metaObject().className() == "Gui::MainWindow":
#return i
评论列表
文章目录