----- Original message -----
> On Thursday 01 July 2010 03:01:05 Diego Turcios wrote:
> > Hi guys
> > I thinks this is the right mailing list for my doubt.
> > I am working on a small application in QT. But right now I have the
> > following problem.
> > I have a line edit, and I want to manipulate the values so only
> numbers
> > (doubles) can be written on this line edit.
> 
> The right way to do this in Qt is to use a validator. Just write this
> line in 
> the constructor of your dialog (after setting up the ui).
> ui->LEPrecio->setValidator( new QDoubleValidator );
> 
> This way you are sure the user can only type a double. No need to do
> any 
> check.

Note that Qt also has a QDoubleSpinBox, which is a suitable widget for entering 
double values.

Regards,
Bjorn

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to