Hi, you should use a QDoubleSpinBox instead of the QLineEdit, but in case you can't do that: the current text of the QLineEdit can be accessed by QLineEdit::text(), and you may want to look at QDoubleValidator.
Ginsengelf
Hi, you should use a QDoubleSpinBox instead of the QLineEdit, but in case you can't do that: the current text of the QLineEdit can be accessed by QLineEdit::text(), and you may want to look at QDoubleValidator.
Ginsengelf
Read the answer in the last thread you started on this exact topic.
If you must use a QLineEdit then QDoubleValidator will prevent (no error message) any character that cannot possibly be part of a number, and can tell you if what remains meets the other validation criteria. See this thread also.
Bookmarks