I keep getting this RuntimeError which I\'m not sure how to fix. Here\'s what I\'m trying to accomplish. I want to update this QTableWidget with values dynamically as I\'m
I believe the issue is that you are binding up a callback with a QTableWidget item and making many many connections (bad). Items can change. Thus, they can be deleted making your callback dead.
What you want is to just let the itemChanged
signal tell you what item changed, the moment it happens.
self.table = QtGui.QTableWidget()
...
# only do this once...ever...on the init of the table object
QtCore.QObject.connect(
self.table,
QtCore.SIGNAL('itemChanged(QTableWidgetItem*)'),
self.UpdateValues
)
And then in your SLOT, it will receive the item:
def UpdateValues(self, tableItem):
print '--------------------------------'
print 'UPDATING TEXT PROPERTY VALUE!!!'
print tableItem.text()