View Full Version : QTableWidget Standard Editor for double precision

27th May 2013, 09:22

I have a QTableWidget in which some fields are of type double.
Qt provides standard editor for double as QDoubleSpinBox which displays as 0.00
My problem is that I want to increase the decimal places to 7 like 0.0000000.
Is there any way to do it ?

I tried subclassing QDoubleSpinBox and used setDecimal(7) in constructor. I set this spin box as QItemEditor for my column (by means of delegates).
But then the max value is restricted 99.9999999.

27th May 2013, 09:45
The documentation is your friend: QDoubleSpinBox::setMaximum()

27th May 2013, 10:18
Thanks ..
But why was I not facing this problem when using the default ?
Also is there any other way apart from sub-classing ?