Hi,
how can i set a range (0.24 – 2.06) to a QLineEdit with a QRegExp?
I try this
Qt Code:
To copy to clipboard, switch view to plain text mode
Thanks in advance
Marco812
Hi,
how can i set a range (0.24 – 2.06) to a QLineEdit with a QRegExp?
I try this
Qt Code:
To copy to clipboard, switch view to plain text mode
Thanks in advance
Marco812
Try:but maybe QDoubleSpinBox will be more usefull? There is also QDoubleValidator.Qt Code:
"0[.,]2[4-9]|0[.,][3-9]\\d|1[.,]\\d\\d|2.0[0-6]"To copy to clipboard, switch view to plain text mode
Marco812 (3rd August 2006)
Hi,
thank you for the tip, but i think in this case is better to use QRegExp as a QDoubleValidator. Your QRegExp is OK, thank you.
Greetings
Marco812
Hi,
sorry i have found an error. I can put values like "2100" or "23" or "24".... I think that's OK:
Qt Code:
"0[.,]2[4-9]|0[.,][3-9]\\d|1[.,]\\d\\d|2[.,]0[0-6]"To copy to clipboard, switch view to plain text mode
Greetings,
Marco812
Last edited by Marco812; 4th August 2006 at 08:39.
Bookmarks