0
votes

I'm creating a sort of little spreadshirt and I need to insert only numbers in all the cells of a column.

Is there anyway to do this just with the tablewidget or do I need to "fill" table with LineEdit and then restict on some way the LineEdit input?

Can someone point me to the right direction?

1

1 Answers

1
votes

After perusing some of the documentation, it looks like you might have to use QLineEdit widgets and setValidator to a QDoubleValidator. This is a fairly simple way to accomplish what you want, but for more complex spreadsheets you might need to get into something like a QTableView and get down and dirty in Qt's Model/View framework.