I have this code:
def CreateActions(self):
global openAct
openAct
= QtGui.
QAction("Open", self
) openAct.setShortcut("Ctrl+O")
self.connect(openAct, QtCore.SIGNAL("triggered()"), self, QtCore.SLOT("self.Open(self)"))
def Open(self):
print "test\n"
def CreateActions(self):
global openAct
openAct = QtGui.QAction("Open", self)
openAct.setShortcut("Ctrl+O")
self.connect(openAct, QtCore.SIGNAL("triggered()"), self, QtCore.SLOT("self.Open(self)"))
def Open(self):
print "test\n"
To copy to clipboard, switch view to plain text mode
When I click the open button in my menu, nothing happens. When the code runs there are no errors. What is the problem?
Bookmarks