Using PySide (or Qt, PyQt), I can connect signal and slot like that
self.myButton = QPushButton("My Button", self)
self.myButton.clicked.connect(self.doSomething)
def doSomething(self, *args):
....
At this moment, can I get the slot outside of the class? I know the name of the function "doSomething", but I hope to know the way to getting the slot programmatically .
I am creating a ui tool for Maya, and within the ui I want to create a shelf button with the command that QPushButton executes. In maya, I can create a shelf button on the active shelf tab by clicking a menu item holding Ctrl+Shift. So I just want to keep the rule. When I click a QPushButton holding Ctrl+Shift, it creates a shelf button on the shelf tab. Of course, I can just store the command as a variable in QPushButton, but it does not seem programmatical :)