How to determine if inputted number is a letter or number? (LineEdit)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mr-ro95

Are there any workaround on how to determine a letter or number on a string? or Is there a way to just allow number input on LineEdit? I don’t want to use SpinBox though, it’s not that customizable unlike LineEdit (Dynamic Font, Styles, etc…)

Thanks

I don’t want to use SpinBox though, it’s not that customizable unlike LineEdit (Dynamic Font, Styles, etc…)

I am having issues with SpinBox aswell but you can customize the font and styles of the spinbox by using a Theme and editing the LineEdit class since the spinbox uses a LineEdit in the back end.

Ram | 2020-02-09 18:15

:bust_in_silhouette: Reply From: Maksanty

In String documentation there are functions like is_valid_float() or is_valid_integer()

Thank you so much. I don’t know why I didn’t notice this in the documentation. Thank you again, cheers.

mr-ro95 | 2019-03-11 02:22