Hi,
I've got a table, and when I create a new row I create a new pushbutton to go into the last column of the new row. I'm trying to workout how to get the currentRow when clicking the pushbutton without selecting the row.
I've got this pseudo code
def printThis(self):
currentRow = self.table.currentRow()
print currentRow
def addRow(self):
self.connect(newButton,SIGNAL("clicked()"),self.printThis)
newRow = self.table.rowCount()
self.table.insertRow(newRow)
#set table widget items
self.table.setCellWidget(newRow, 3, newButton)
def printThis(self):
currentRow = self.table.currentRow()
print currentRow
def addRow(self):
newButton = QPushButton(Qstring('push'))
self.connect(newButton,SIGNAL("clicked()"),self.printThis)
newRow = self.table.rowCount()
self.table.insertRow(newRow)
#set table widget items
self.table.setCellWidget(newRow, 3, newButton)
To copy to clipboard, switch view to plain text mode
Help please?
Bookmarks