diff --git a/src/widgets/accessible/simplewidgets.cpp b/src/widgets/accessible/simplewidgets.cpp index a2805a2458..f22f9cb2ed 100644 --- a/src/widgets/accessible/simplewidgets.cpp +++ b/src/widgets/accessible/simplewidgets.cpp @@ -664,11 +664,13 @@ void QAccessibleLineEdit::setText(QAccessible::Text t, const QString &text) } QString newText = text; +#if QT_CONFIG(validator) if (lineEdit()->validator()) { int pos = 0; if (lineEdit()->validator()->validate(newText, pos) != QValidator::Acceptable) return; } +#endif lineEdit()->setText(newText); }