Hi,
sorry the late answer, but i have a long time read the doc and written code. I thing the right way is disabling widgets.
I do this to check QValidator::State:
int pos = 0;
QList<QLineEdit *> leList= this->findChildren<QLineEdit *>();
for (int i=0;i<leList.size();i++){
state = leList[i]->validator()->validate(leList[i]->text(), pos);
if(state
== QValidator::Intermediate && leList
[i
]->text
() != ""){ //disabling widgets
}
}
int pos = 0;
QValidator::State state;
QList<QLineEdit *> leList= this->findChildren<QLineEdit *>();
for (int i=0;i<leList.size();i++){
state = leList[i]->validator()->validate(leList[i]->text(), pos);
if(state == QValidator::Intermediate && leList[i]->text() != ""){
//disabling widgets
}
}
To copy to clipboard, switch view to plain text mode
That's worke fine, but i get a error if a QLineEdit without QValidator.
How can i check if QLineEdit Validator set, or you know a other solution?
Greetings,
Whitefurrows
Bookmarks