I have a table created with 2 columns and 0 rows called tableWidget_Events.
Here's what the table and grid of buttons look like:

Using the value from the spinbox, I want to insert the button text as a row, so if the spinbox = 1 and I click walk, there should be a row created with 1 in the first column and walk in the second column.
Here's the code I have to connect the buttons:
self.pushButton_SO.clicked.connect(self.add_table)
self.pushButton_Walk.clicked.connect(self.add_table)
self.pushButton_GB.clicked.connect(self.add_table)
self.pushButton_FB.clicked.connect(self.add_table)
self.pushButton_PU.clicked.connect(self.add_table)
Then the function to add the row:
def add_table(self):
button = self.sender() # get button text
row = self.spinBox_AB_TBL.value() #get value from spinbox
rowPosition = self.tableWidget_Events.rowCount()
self.tableWidget_Events.insertRow(rowPosition) #insert new row
self.tableWidget_Events.setItem(row, 0, QtGui.QTableWidgetItem(self.spinBox_AB_TBL.value()))
self.tableWidget_Events.setItem(row, 1, QtGui.QTableWidgetItem(button.text()))
The buttons are connected. I can print the button text to the console, and each button click adds a new row. Inserting the text is what I'm hung up on.
Thank you.