Skip to content

PythonQt.QtGui.QRegularExpressionValidator · declarations 001

Back to PythonQt.QtGui.QRegularExpressionValidator

changed

changed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QRegularExpressionValidator.changed; argument details are not documented.

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QRegularExpressionValidator.destroyed; argument details are not documented.

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QRegularExpressionValidator.objectNameChanged; argument details are not documented.

regularExpression instance-attribute

regularExpression: QRegularExpression

Qt 5 reference:

regularExpression : QRegularExpression

This property holds the regular expression used for validation

By default, this property contains a regular expression with an empty pattern (which therefore matches any string).

Access functions:

QRegularExpression regularExpression() const
void setRegularExpression(const QRegularExpression \&re)

Notifier signal:

void regularExpressionChanged(const QRegularExpression \&re)

Source: https://doc.qt.io/archives/qt-5.15/qregularexpressionvalidator.html#regularExpression

regularExpressionChanged

regularExpressionChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QRegularExpressionValidator.regularExpressionChanged; argument details are not documented.

setRegularExpression

setRegularExpression(re: Any) -> None

X.setRegularExpression(re)

Upstream PySide2 reference signatures (binding differences may apply):

setRegularExpression(self, re: PySide2.QtCore.QRegularExpression) -> None

Source: https://doc.qt.io/archives/qt-5.15/qregularexpressionvalidator.html#setRegularExpression

validate

validate(input: str, pos: int) -> Any

X.validate(input, pos)

Supplemental documentation: Qt 5 reference:

[override virtual] QValidator::State QRegularExpressionValidator::validate(QString \&input, int \&pos) const

Reimplements: QValidator::validate(QString \&input, int \&pos) const.

Returns Acceptable if input is matched by the regular expression for this validator, Intermediate if it has matched partially (i.e. could be a valid match if additional valid characters are added), and Invalid if input is not matched.

In case the input is not matched, the pos parameter is set to the length of the input parameter; otherwise, it is not modified.

For example, if the regular expression is \w\d\d (word-character, digit, digit) then "A57" is Acceptable, "E5" is Intermediate, and "+9" is Invalid.

See also QRegularExpression::match().

Upstream PySide2 reference signatures (binding differences may apply):

validate(self, input: str, pos: int) -> PySide2.QtGui.QValidator.State

Source: https://doc.qt.io/archives/qt-5.15/qregularexpressionvalidator.html#validate