If I have a really simple QTableWidget like the following:
data = ['first_row', 'second_row', 'third_row']
qTable = self.dockwidget.tableWidget
qTable.setRowCount(len(data))
qTable.setColumnCount(2)
for row in range(len(data)):
for col in [0]:
item = QTableWidgetItem(str(data[row]))
qTable.setItem(row,col,item)
for col in [1]:
qTable.setItem(row,col,'0.1')
How could I make so that in the second column (where the default value is 0.1), the user can only input values and not string?