PDA

View Full Version : WHAT COMPONENT CAN I USE TO READ double VALUES?



ayanda83
27th August 2012, 13:51
Hi everyone, I'm having trouble finding the right component to read "double" values from the keyboard. I've tried a QDoubleSpinBox but it only take a number no longer than 2 digits before the decimal point. Can I use a QLineEdit component and than find someway to convert my input into double values? And also my program is suppose to pop-up an error message in case text is entered instead of digits. PLEASE ASSIST.

spirit
27th August 2012, 14:06
QDoubleSpinBox has properties to set up a number of digits, max and min value. See QDoubleSpinBox::maximum, QDoubleSpinBox::minimum, QDoubleSpinBox::decimals.

ChrisW67
28th August 2012, 02:53
WHAT COMPONENT CAN I USE TO READ double VALUES?

PLEASE ASSIST.
No need to YELL, we can also read quiet text.