Solved How to enter only numbers in QML in TextField
-
Hi!
How in QML in TextField to make the ability to enter only numbers? -
Hi,
Since you only want to input numbers, wouldn't a SpinBox make more sense ?
-
Or look at inputMethodHints property.
-
@mikeeeeee Use an
IntValidator
https://doc.qt.io/qt-5/qml-qtquick-intvalidator.html
TextField { //... validator: IntValidator {bottom: 1; top: 100} }