QWidgetTable filtering text only numbers using QLineEdit and QDoubleValidator
i have a a QTableWidget that have to handle only double values and i don't know how to achieve it... i googled a lot and some confusing solutions found, i tried this one:
if understood well what im trying to do is like puttin QLineEdit into the QTableWIdgetItems selected by appropriate Slot (named myCellChanged); problem is when i finish to fill the table items it has an anormal behavior as sometimes it filter inputs and sometimes no.... what I'm doing wrong?
Here's my source:
Have a look at the "Spin Box Delegate Example":http://qt-project.org/doc/qt-4.8/itemviews-spinboxdelegate.html it is easily adaptable to use a QDoubleSpinBox and seems to fit your need.
Hope it helps