K
K
Kai2018-05-13 09:01:34
PyQt
Kai, 2018-05-13 09:01:34

Restricting input to everything but float range from 0.0 to 1.0 in Line Edit - Python/PyQt4?

Good afternoon, please tell me how to limit the input in Line Edit to everything except the range of real numbers from 0.0 to 1.0
Initially, Line Edit is empty, only with a holder.
Purpose:only real numbers from 0.0 to 1.0 are entered in the program interface in Line Edit
I know that you can use QIntValidator for integers, but for floating point numbers?
Thank you. PyQt4, python 3.4.3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
saw_tooth, 2019-05-02
@saw_tooth

QDoubleValidator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question