sonuani
20th March 2008, 12:31
hi ,
i have a qlineedit which should accept only numbers and nothing else.I wrote the below code.This only allows me to enter a digit of length 10.But i should be able to enter a text of any length.Wts the prob with my code?
QValidator *validator = new QIntValidator(this);
m_ctrllineedit->setValidator(validator);
i have a qlineedit which should accept only numbers and nothing else.I wrote the below code.This only allows me to enter a digit of length 10.But i should be able to enter a text of any length.Wts the prob with my code?
QValidator *validator = new QIntValidator(this);
m_ctrllineedit->setValidator(validator);