PDA

View Full Version : QLineEdit + QIntValidator



fruzzo
24th April 2008, 14:39
I want a qlineedit that get in input only a range of values (for example 5..20)
For this I use a validator:
myLinedit->setValidator( new QIntValidator(5, 20, myLinedit));

I want too that the values out range aren't visualized-accepted...for example if I press 3 in the linedit I want that it isn't visulized. How I can do this?

mazurekwrc
24th April 2008, 15:14
use QRegExpValidator and this help