PythonQt.QtCore.QUrlQuery · declarations 001
Back to PythonQt.QtCore.QUrlQuery
addQueryItem
addQueryItem(key: str, value: str) -> None
X.addQueryItem(key, value)
Supplemental documentation: Qt 5 reference:
void QUrlQuery::addQueryItem(const QString \&key, const QString \&value)
Appends the pair key \= value to the end of the query string of the URL. This method does not overwrite existing items that might exist with the same key.
Note: This method does not treat spaces (ASCII 0x20) and plus ("+") signs as the same, like HTML forms do. If you need spaces to be represented as plus signs, use actual plus signs.
See also hasQueryItem() and queryItemValue().
Upstream PySide2 reference signatures (binding differences may apply):
addQueryItem(self, key: str, value: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#addQueryItem
allQueryItemValues
allQueryItemValues(key: str, encoding: Any) -> tuple
X.allQueryItemValues(key, encoding) -> tuple
Supplemental documentation: Qt 5 reference:
QStringList QUrlQuery::allQueryItemValues(const QString \&key, QUrl::ComponentFormattingOptions encoding \= QUrl::PrettyDecoded) const
Returns the a list of query string values whose key is equal to key from the URL, using the options specified in encoding to encode the return value. If the key key is not found, this function returns an empty list.
See also queryItemValue() and addQueryItem().
Upstream PySide2 reference signatures (binding differences may apply):
allQueryItemValues(self, key: str, encoding: PySide2.QtCore.QUrl.ComponentFormattingOption=...) -> typing.List[str]
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#allQueryItemValues
clear
clear() -> None
X.clear()
Supplemental documentation: Qt 5 reference:
void QUrlQuery::clear()
Clears this QUrlQuery object by removing all of the key-value pairs currently stored. If the query delimiters have been changed, this function will leave them with their changed values.
See also isEmpty() and setQueryDelimiters().
Upstream PySide2 reference signatures (binding differences may apply):
clear(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#clear
defaultQueryPairDelimiter
defaultQueryPairDelimiter() -> str
X.defaultQueryPairDelimiter()
Supplemental documentation: Qt 5 reference:
[static] QChar QUrlQuery::defaultQueryPairDelimiter()
Returns the default character for separating keys-value pairs from each other, an ampersand ("\&").
See also setQueryDelimiters(), queryPairDelimiter(), and defaultQueryValueDelimiter().
Upstream PySide2 reference signatures (binding differences may apply):
defaultQueryPairDelimiter() -> str
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#defaultQueryPairDelimiter
defaultQueryValueDelimiter
defaultQueryValueDelimiter() -> str
X.defaultQueryValueDelimiter()
Supplemental documentation: Qt 5 reference:
[static] QChar QUrlQuery::defaultQueryValueDelimiter()
Returns the default character for separating keys from values in the query, an equal sign ("\=").
See also setQueryDelimiters(), queryValueDelimiter(), and defaultQueryPairDelimiter().
Upstream PySide2 reference signatures (binding differences may apply):
defaultQueryValueDelimiter() -> str
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#defaultQueryValueDelimiter
hasQueryItem
hasQueryItem(key: str) -> bool
X.hasQueryItem(key) -> bool
Supplemental documentation: Qt 5 reference:
bool QUrlQuery::hasQueryItem(const QString \&key) const
Returns true if there is a query string pair whose key is equal to key from the URL.
See also addQueryItem() and queryItemValue().
Upstream PySide2 reference signatures (binding differences may apply):
hasQueryItem(self, key: str) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#hasQueryItem
isEmpty
isEmpty() -> bool
X.isEmpty() -> bool
Supplemental documentation: Qt 5 reference:
bool QUrlQuery::isEmpty() const
Returns true if this QUrlQuery
object contains no key-value pairs, such as after being default-constructed or after
parsing an empty query string.
See also setQuery() and clear().
Upstream PySide2 reference signatures (binding differences may apply):
isEmpty(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#isEmpty
operator_assign
operator_assign(other: Any) -> Any
X.operator_assign(other) -> PythonQt.QtCore.QUrlQuery
query
query(encoding: Any) -> str
X.query(encoding) -> str
Supplemental documentation: Qt 5 reference:
QString QUrlQuery::query(QUrl::ComponentFormattingOptions encoding \= QUrl::PrettyDecoded) const
Returns the reconstructed query string, formed from the key-value pairs currently stored in this QUrlQuery object and separated by the query delimiters chosen for this object. The keys and values are encoded using the options given by the encoding parameter.
For this function, the only ambiguous delimiter is the hash ("#"), as in URLs it is used to separate the query string from the fragment that may follow.
The order of the key-value pairs in the returned string is exactly the same as in the original query.
See also setQuery(), QUrl::setQuery(), QUrl::fragment(), and Encoding.
Upstream PySide2 reference signatures (binding differences may apply):
query(self, encoding: PySide2.QtCore.QUrl.ComponentFormattingOption=...) -> str
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#query
queryItemValue
queryItemValue(key: str, encoding: Any) -> str
X.queryItemValue(key, encoding) -> str
Supplemental documentation: Qt 5 reference:
QString QUrlQuery::queryItemValue(const QString \&key, QUrl::ComponentFormattingOptions encoding \= QUrl::PrettyDecoded) const
Returns the query value associated with key key from the URL, using the options specified in encoding to encode the return value. If the key key is not found, this function returns an empty string. If you need to distinguish between an empty value and a non-existent key, you should check for the key's presence first using hasQueryItem().
If the key key is multiply defined, this function will return the first one found, in the order they were present in the query string or added using addQueryItem().
See also addQueryItem(), allQueryItemValues(), and Encoding.
Upstream PySide2 reference signatures (binding differences may apply):
queryItemValue(self, key: str, encoding: PySide2.QtCore.QUrl.ComponentFormattingOption=...) -> str
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#queryItemValue
queryItems
queryItems(encoding: Any) -> tuple
X.queryItems(encoding) -> tuple
Supplemental documentation: Qt 5 reference:
QList\<QPair\<QString, QString>> QUrlQuery::queryItems(QUrl::ComponentFormattingOptions encoding \= QUrl::PrettyDecoded) const
Returns the query string of the URL, as a map of keys and values, using the options specified in encoding to encode the items. The order of the elements is the same as the one found in the query string or set with setQueryItems().
See also setQueryItems() and Encoding.
Upstream PySide2 reference signatures (binding differences may apply):
queryItems(self, encoding: PySide2.QtCore.QUrl.ComponentFormattingOption=...) -> typing.List[typing.Tuple[str, str]]
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#queryItems
queryPairDelimiter
queryPairDelimiter() -> str
X.queryPairDelimiter()
Supplemental documentation: Qt 5 reference:
QChar QUrlQuery::queryPairDelimiter() const
Returns the character used to delimit between keys-value pairs when reconstructing the query string in query() or when parsing in setQuery().
See also setQueryDelimiters() and queryValueDelimiter().
Upstream PySide2 reference signatures (binding differences may apply):
queryPairDelimiter(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#queryPairDelimiter
queryValueDelimiter
queryValueDelimiter() -> str
X.queryValueDelimiter()
Supplemental documentation: Qt 5 reference:
QChar QUrlQuery::queryValueDelimiter() const
Returns the character used to delimit between keys and values when reconstructing the query string in query() or when parsing in setQuery().
See also setQueryDelimiters() and queryPairDelimiter().
Upstream PySide2 reference signatures (binding differences may apply):
queryValueDelimiter(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#queryValueDelimiter
removeAllQueryItems
removeAllQueryItems(key: str) -> None
X.removeAllQueryItems(key)
Supplemental documentation: Qt 5 reference:
void QUrlQuery::removeAllQueryItems(const QString \&key)
Removes all the query string pairs whose key is equal to key from the URL.
See also removeQueryItem().
Upstream PySide2 reference signatures (binding differences may apply):
removeAllQueryItems(self, key: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#removeAllQueryItems
removeQueryItem
removeQueryItem(key: str) -> None
X.removeQueryItem(key)
Supplemental documentation: Qt 5 reference:
void QUrlQuery::removeQueryItem(const QString \&key)
Removes the query string pair whose key is equal to key from the URL. If there are multiple items with a key equal to key, it removes the first item in the order they were present in the query string or added with addQueryItem().
See also removeAllQueryItems().
Upstream PySide2 reference signatures (binding differences may apply):
removeQueryItem(self, key: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#removeQueryItem
setQuery
setQuery(queryString: str) -> None
X.setQuery(queryString)
Supplemental documentation: Qt 5 reference:
void QUrlQuery::setQuery(const QString \&queryString)
Parses the query string in queryString and sets the internal items to the values found there. If any delimiters have been specified with setQueryDelimiters(), this function will use them instead of the default delimiters to parse the string.
See also query().
Upstream PySide2 reference signatures (binding differences may apply):
setQuery(self, queryString: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#setQuery
setQueryDelimiters
setQueryDelimiters(valueDelimiter: str, pairDelimiter: str) -> None
X.setQueryDelimiters(valueDelimiter, pairDelimiter)
Supplemental documentation: Qt 5 reference:
void QUrlQuery::setQueryDelimiters(QChar valueDelimiter, QChar pairDelimiter)
Sets the characters used for delimiting between keys and values, and between key-value pairs in the URL's query string. The default value delimiter is '\=' and the default pair delimiter is '\&'.

valueDelimiter will be used for separating keys from values, and pairDelimiter will be used to separate key-value pairs. Any occurrences of these delimiting characters in the encoded representation of the keys and values of the query string are percent encoded when returned in query().
If valueDelimiter is set to '(' and pairDelimiter is ')', the above query string would instead be represented like this:
http://www.example.com/cgi-bin/drawgraph.cgi?type(pie)color(green)
Note: Non-standard delimiters should be chosen from among what RFC 3986 calls "sub-delimiters". They are:
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
Use of other characters is not supported and may result in unexpected behaviour. This method does not verify that you passed a valid delimiter.
See also queryValueDelimiter() and queryPairDelimiter().
Upstream PySide2 reference signatures (binding differences may apply):
setQueryDelimiters(self, valueDelimiter: str, pairDelimiter: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#setQueryDelimiters
setQueryItems
setQueryItems(query: Any) -> None
X.setQueryItems(query)
Supplemental documentation: Qt 5 reference:
void QUrlQuery::setQueryItems(const QList\<QPair\<QString, QString>> \&query)
Sets the items in this QUrlQuery object to query. The order of the elements in query is preserved.
Note: This method does not treat spaces (ASCII 0x20) and plus ("+") signs as the same, like HTML forms do. If you need spaces to be represented as plus signs, use actual plus signs.
See also queryItems() and isEmpty().
Upstream PySide2 reference signatures (binding differences may apply):
setQueryItems(self, query: typing.Sequence[typing.Tuple[str, str]]) -> None
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#setQueryItems
swap
swap(other: Any) -> None
X.swap(other)
Supplemental documentation: Qt 5 reference:
void QUrlQuery::swap(QUrlQuery \&other)
Swaps this URL query instance with other. This function is very fast and never fails.
Upstream PySide2 reference signatures (binding differences may apply):
swap(self, other: PySide2.QtCore.QUrlQuery) -> None
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#swap
toString
toString(encoding: Any) -> str
X.toString(encoding) -> str
Supplemental documentation: Qt 5 reference:
QString QUrlQuery::toString(QUrl::ComponentFormattingOptions encoding \= QUrl::PrettyDecoded) const
Returns this QUrlQuery as a QString. encoding can be used to specify the URL string encoding of the return value.
Upstream PySide2 reference signatures (binding differences may apply):
toString(self, encoding: PySide2.QtCore.QUrl.ComponentFormattingOption=...) -> str
Source: https://doc.qt.io/archives/qt-5.15/qurlquery.html#toString