I want to keep track of the user modifying the company's forecast in my custom made app. I created it using qt designer and PyQt4, and I'm using QSpinBox for the quantities (easy way to control range of values and masking the fields to be number only). The problem I'm having is when I want to get the QSpinBox that triggered my function. At this moment it's being triggered using valueChanged.connect but could be using anything else. I can get the int in the spinbox but not the spinbox's name. Thanks beforehand for the help!
SOLUTION
The QSpinBox element
self.Item = QtGui.QSpinBox(self.centralwidget)
self.Item.setObjectName(_fromUtf8("ItemName"))
Trigger
self.Item.valueChanged.connect(self.foo)
The function it calls
def foo(self,obj):
sender = MainWindow.sender()
print sender.objectName()
In this case "MainWindow" is my QtCore.QObject