假设我有一个方法:
def open(self, opt):
if opt == True:
...
if opt == False:
...
我如何通过QtGui传递参数给它。QAction :
self.openAct = QtGui.QAction("O&pen", self, shortcut="Ctrl+O",
statusTip="Opens a location", triggered=self.open)
我发现答案是从functools导入部分。