11 : QLineEdit(parent), valid(true), checkValidator(nullptr) {
12 connect(
this, &QValidatedLineEdit::textChanged,
this,
17 if (_valid == this->
valid) {
35 QLineEdit::focusInEvent(evt);
41 QLineEdit::focusOutEvent(evt);
63 QLineEdit::setEnabled(enabled);
67 if (text().isEmpty()) {
69 }
else if (hasAcceptableInput()) {
74 QString address = text();
77 QValidator::Acceptable) {
95 QString address = text();
97 if (
checkValidator->validate(address, pos) == QValidator::Acceptable) {
QValidatedLineEdit(QWidget *parent)
void validationDidChange(QValidatedLineEdit *validatedLineEdit)
void focusOutEvent(QFocusEvent *evt) override
void setValid(bool valid)
void focusInEvent(QFocusEvent *evt) override
void setEnabled(bool enabled)
void setCheckValidator(const QValidator *v)
const QValidator * checkValidator