Skip to content

PythonQt.QtGui.QValidator · declarations 001

Back to PythonQt.QtGui.QValidator

changed

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

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

Supplemental documentation: Qt 5 reference:

[signal] void QValidator::changed()

This signal is emitted when any property that may affect the validity of a string has changed.

Source: https://doc.qt.io/archives/qt-5.15/qvalidator.html#changed

destroyed

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

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

fixup

fixup(arg__1: str) -> None

X.fixup(arg__1)

Supplemental documentation: Qt 5 reference:

[virtual] void QValidator::fixup(QString \&input) const

This function attempts to change input to be valid according to this validator's rules. It need not result in a valid string: callers of this function must re-test afterwards; the default does nothing.

Reimplementations of this function can change input even if they do not produce a valid string. For example, an ISBN validator might want to delete every character except digits and "-", even if the result is still not a valid ISBN; a surname validator might want to remove whitespace from the start and end of the string, even if the resulting string is not in the list of accepted surnames.

Upstream PySide2 reference signatures (binding differences may apply):

fixup(self, arg__1: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qvalidator.html#fixup

locale

locale() -> Any

X.locale() -> PythonQt.QtCore.QLocale

Supplemental documentation: Qt 5 reference:

QLocale QValidator::locale() const

Returns the locale for the validator. The locale is by default initialized to the same as QLocale().

See also setLocale() and QLocale::QLocale().

Upstream PySide2 reference signatures (binding differences may apply):

locale(self) -> PySide2.QtCore.QLocale

Source: https://doc.qt.io/archives/qt-5.15/qvalidator.html#locale

objectNameChanged

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

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

setLocale

setLocale(locale: Any) -> None

X.setLocale(locale)

Supplemental documentation: Qt 5 reference:

void QValidator::setLocale(const QLocale \&locale)

Sets the locale that will be used for the validator. Unless setLocale has been called, the validator will use the default locale set with QLocale::setDefault(). If a default locale has not been set, it is the operating system's locale.

See also locale() and QLocale::setDefault().

Upstream PySide2 reference signatures (binding differences may apply):

setLocale(self, locale: PySide2.QtCore.QLocale) -> None

Source: https://doc.qt.io/archives/qt-5.15/qvalidator.html#setLocale

validate

validate(arg__1: str, arg__2: int) -> Any

X.validate(arg__1, arg__2)

Supplemental documentation: Qt 5 reference:

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

This virtual function returns Invalid if input is invalid according to this validator's rules, Intermediate if it is likely that a little more editing will make the input acceptable (e.g. the user types "4" into a widget which accepts integers between 10 and 99), and Acceptable if the input is valid.

The function can change both input and pos (the cursor position) if required.

Upstream PySide2 reference signatures (binding differences may apply):

validate(self, arg__1: str, arg__2: int) -> PySide2.QtGui.QValidator.State

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