I am new to PySide. I want to get the QPushButton obj (such as use it to get its text) in its clicked slot.
button = QtGui.QPushButton("start go")
button.clicked.connect(self.buttonClick)
def buttonClick(self):
... # How can I get the button object?
# print button.text() how to get the text : 'start go' ?
Thanks!
Here is what I did to solve the problem:
button = QtGui.QPushButton("start go")
button.clicked.connect(lambda: self.buttonClick(button))
def buttonClick(self, button):
print button.text()