Skip to content

PythonQt.QtCore.QUrl · declarations 003

Back to PythonQt.QtCore.QUrl

userInfo

userInfo(options: Any) -> str

X.userInfo(options) -> str

Supplemental documentation: Qt 5 reference:

QString QUrl::userInfo(QUrl::ComponentFormattingOptions options \= PrettyDecoded) const

Returns the user info of the URL, or an empty string if the user info is undefined.

This function returns an unambiguous value, which may contain that characters still percent-encoded, plus some control sequences not representable in decoded form in QString.

The options argument controls how to format the user info component. The value of QUrl::FullyDecoded is not permitted in this function. If you need to obtain fully decoded data, call userName() and password() individually.

See also setUserInfo(), userName(), password(), and authority().

Upstream PySide2 reference signatures (binding differences may apply):

userInfo(self, options: PySide2.QtCore.QUrl.ComponentFormattingOption=...) -> str

Source: https://doc.qt.io/archives/qt-5.15/qurl.html#userInfo

userName

userName(options: Any) -> str

X.userName(options) -> str

Supplemental documentation: Qt 5 reference:

QString QUrl::userName(QUrl::ComponentFormattingOptions options \= FullyDecoded) const

Returns the user name of the URL if it is defined; otherwise an empty string is returned.

The options argument controls how to format the user name component. All values produce an unambiguous result. With QUrl::FullyDecoded, all percent-encoded sequences are decoded; otherwise, the returned value may contain some percent-encoded sequences for some control sequences not representable in decoded form in QString.

Note that QUrl::FullyDecoded may cause data loss if those non-representable sequences are present. It is recommended to use that value when the result will be used in a non-URL context, such as setting in QAuthenticator or negotiating a login.

See also setUserName() and userInfo().

Upstream PySide2 reference signatures (binding differences may apply):

userName(self, options: PySide2.QtCore.QUrl.ComponentFormattingOption=...) -> str

Source: https://doc.qt.io/archives/qt-5.15/qurl.html#userName