
Originally Posted by
whitefurrows
How can i check if QLineEdit Validator set, or you know a other solution?
const QValidator * QLineEdit::validator () const
Returns a pointer to the current input validator,
or 0 if no validator has been set.
So this should work:
...
QList<QLineEdit *> leList= this->findChildren<QLineEdit *>();
for (int i=0;i<leList.size();i++){
if( leList[i]->validator() != 0 ) {
state = leList[i]->validator()->validate(leList[i]->text(), pos);
...
}
}
...
QList<QLineEdit *> leList= this->findChildren<QLineEdit *>();
for (int i=0;i<leList.size();i++){
if( leList[i]->validator() != 0 ) {
state = leList[i]->validator()->validate(leList[i]->text(), pos);
...
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks