PythonQt.QtCore.QJsonArray · declarations 001
Back to PythonQt.QtCore.QJsonArray
append
append(value: Any) -> None
X.append(value)
Supplemental documentation: Qt 5 reference:
void QJsonArray::append(const QJsonValue \&value)
Inserts value at the end of the array.
See also prepend() and insert().
Upstream PySide2 reference signatures (binding differences may apply):
append(self, value: PySide2.QtCore.QJsonValue) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#append
at
at(i: int) -> Any
X.at(i) -> PythonQt.QtCore.QJsonValue
Supplemental documentation: Qt 5 reference:
QJsonValue QJsonArray::at(int i) const
Returns a QJsonValue representing the value for index i.
The returned QJsonValue is
Undefined, if i is out of bounds.
Upstream PySide2 reference signatures (binding differences may apply):
at(self, i: int) -> PySide2.QtCore.QJsonValue
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#at
contains
contains(element: Any) -> bool
X.contains(element) -> bool
Supplemental documentation: Qt 5 reference:
bool QJsonArray::contains(const QJsonValue \&value) const
Returns true if the array contains an occurrence of value, otherwise false.
See also count().
Upstream PySide2 reference signatures (binding differences may apply):
contains(self, element: PySide2.QtCore.QJsonValue) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#contains
count
count() -> int
empty
empty() -> bool
X.empty() -> bool
Supplemental documentation: Qt 5 reference:
bool QJsonArray::empty() const
This function is provided for STL compatibility. It is equivalent to
isEmpty() and returns
true if the array is empty.
Upstream PySide2 reference signatures (binding differences may apply):
empty(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#empty
first
first() -> Any
X.first() -> PythonQt.QtCore.QJsonValue
Supplemental documentation: Qt 5 reference:
QJsonValue QJsonArray::first() const
Returns the first value stored in the array.
Same as at(0).
See also at().
Upstream PySide2 reference signatures (binding differences may apply):
first(self) -> PySide2.QtCore.QJsonValue
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#first
fromStringList
fromStringList(list: Any) -> Any
X.fromStringList(list) -> PythonQt.QtCore.QJsonArray
Supplemental documentation: Qt 5 reference:
[static] QJsonArray QJsonArray::fromStringList(const QStringList \&list)
Converts the string list list to a QJsonArray.
The values in list will be converted to JSON values.
See also toVariantList() and QJsonValue::fromVariant().
Upstream PySide2 reference signatures (binding differences may apply):
fromStringList(list: typing.Sequence[str]) -> PySide2.QtCore.QJsonArray
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#fromStringList
fromVariantList
fromVariantList(list: Any) -> Any
X.fromVariantList(list) -> PythonQt.QtCore.QJsonArray
Supplemental documentation: Qt 5 reference:
[static] QJsonArray QJsonArray::fromVariantList(const QVariantList \&list)
Converts the variant list list to a QJsonArray.
The QVariant values in list will be converted to JSON values.
Note: Conversion from QVariant is not completely lossless. Please see the documentation in QJsonValue::fromVariant() for more information.
See also toVariantList() and QJsonValue::fromVariant().
Upstream PySide2 reference signatures (binding differences may apply):
fromVariantList(list: typing.Sequence[typing.Any]) -> PySide2.QtCore.QJsonArray
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#fromVariantList
insert
insert(i: int, value: Any) -> None
X.insert(i, value)
Supplemental documentation: Qt 5 reference:
void QJsonArray::insert(int i, const QJsonValue \&value)
Inserts value at index position i in the array. If i is 0, the value is
prepended to the array. If i is
size(), the value is appended
to the array.
See also append(), prepend(), replace(), and removeAt().
QJsonArray::iterator QJsonArray::insert(QJsonArray::iterator before, const QJsonValue \&value)
Inserts value before the position pointed to by before, and returns an iterator pointing to the newly inserted item.
See also erase() and insert().
Upstream PySide2 reference signatures (binding differences may apply):
insert(self, i: int, value: PySide2.QtCore.QJsonValue) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#insert
isEmpty
isEmpty() -> bool
X.isEmpty() -> bool
Supplemental documentation: Qt 5 reference:
bool QJsonArray::isEmpty() const
Returns true if the object is empty. This is the same as
size() \=\= 0.
See also size().
Upstream PySide2 reference signatures (binding differences may apply):
isEmpty(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#isEmpty
last
last() -> Any
X.last() -> PythonQt.QtCore.QJsonValue
Supplemental documentation: Qt 5 reference:
QJsonValue QJsonArray::last() const
Returns the last value stored in the array.
Same as at(size() - 1).
See also at().
Upstream PySide2 reference signatures (binding differences may apply):
last(self) -> PySide2.QtCore.QJsonValue
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#last
operator_assign
operator_assign(other: Any) -> Any
X.operator_assign(other) -> PythonQt.QtCore.QJsonArray
operator_subscript
operator_subscript(i: Any) -> Any
X.operator_subscript(i) -> PythonQt.QtCore.QJsonValue
pop_back
pop_back() -> None
X.pop_back()
Supplemental documentation: Qt 5 reference:
void QJsonArray::pop_back()
This function is provided for STL compatibility. It is equivalent to removeLast(). The array must not be empty. If the array can be empty, call isEmpty() before calling this function.
Upstream PySide2 reference signatures (binding differences may apply):
pop_back(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#pop_back
pop_front
pop_front() -> None
X.pop_front()
Supplemental documentation: Qt 5 reference:
void QJsonArray::pop_front()
This function is provided for STL compatibility. It is equivalent to removeFirst(). The array must not be empty. If the array can be empty, call isEmpty() before calling this function.
Upstream PySide2 reference signatures (binding differences may apply):
pop_front(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#pop_front
prepend
prepend(value: Any) -> None
X.prepend(value)
Supplemental documentation: Qt 5 reference:
void QJsonArray::prepend(const QJsonValue \&value)
Inserts value at the beginning of the array.
This is the same as insert(0, value) and will prepend value to the array.
See also append() and insert().
Upstream PySide2 reference signatures (binding differences may apply):
prepend(self, value: PySide2.QtCore.QJsonValue) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#prepend
push_back
push_back(t: Any) -> None
X.push_back(t)
Supplemental documentation: Qt 5 reference:
void QJsonArray::push_back(const QJsonValue \&value)
This function is provided for STL compatibility. It is equivalent to append(value) and will append value to the array.
Upstream PySide2 reference signatures (binding differences may apply):
push_back(self, t: PySide2.QtCore.QJsonValue) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#push_back
push_front
push_front(t: Any) -> None
X.push_front(t)
Supplemental documentation: Qt 5 reference:
void QJsonArray::push_front(const QJsonValue \&value)
This function is provided for STL compatibility. It is equivalent to prepend(value) and will prepend value to the array.
Upstream PySide2 reference signatures (binding differences may apply):
push_front(self, t: PySide2.QtCore.QJsonValue) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#push_front
removeAt
removeAt(i: int) -> None
X.removeAt(i)
Supplemental documentation: Qt 5 reference:
void QJsonArray::removeAt(int i)
Removes the value at index position i. i must be a valid index position in the array
(i.e., 0 <= i < size()).
See also insert() and replace().
Upstream PySide2 reference signatures (binding differences may apply):
removeAt(self, i: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#removeAt
removeFirst
removeFirst() -> None
X.removeFirst()
Supplemental documentation: Qt 5 reference:
void QJsonArray::removeFirst()
Removes the first item in the array. Calling this function is equivalent to calling
removeAt(0). The array must not be empty. If the array can be empty, call
isEmpty() before calling
this function.
See also removeAt() and removeLast().
Upstream PySide2 reference signatures (binding differences may apply):
removeFirst(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#removeFirst
removeLast
removeLast() -> None
X.removeLast()
Supplemental documentation: Qt 5 reference:
void QJsonArray::removeLast()
Removes the last item in the array. Calling this function is equivalent to calling
removeAt(size() - 1). The array must not be empty. If the array can be empty, call
isEmpty() before calling
this function.
See also removeAt() and removeFirst().
Upstream PySide2 reference signatures (binding differences may apply):
removeLast(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#removeLast
replace
replace(i: int, value: Any) -> None
X.replace(i, value)
Supplemental documentation: Qt 5 reference:
void QJsonArray::replace(int i, const QJsonValue \&value)
Replaces the item at index position i with value. i must be a valid index position
in the array (i.e., 0 <= i < size()).
See also operator[]() and removeAt().
Upstream PySide2 reference signatures (binding differences may apply):
replace(self, i: int, value: PySide2.QtCore.QJsonValue) -> None
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#replace
size
size() -> int
X.size() -> int
Supplemental documentation: Qt 5 reference:
int QJsonArray::size() const
Returns the number of values stored in the array.
Upstream PySide2 reference signatures (binding differences may apply):
size(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#size
takeAt
takeAt(i: int) -> Any
X.takeAt(i) -> PythonQt.QtCore.QJsonValue
Supplemental documentation: Qt 5 reference:
QJsonValue QJsonArray::takeAt(int i)
Removes the item at index position i and returns it. i must be a valid index
position in the array (i.e., 0 <= i < size()).
If you don't use the return value, removeAt() is more efficient.
See also removeAt().
Upstream PySide2 reference signatures (binding differences may apply):
takeAt(self, i: int) -> PySide2.QtCore.QJsonValue
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#takeAt
toVariantList
toVariantList() -> tuple
X.toVariantList() -> tuple
Supplemental documentation: Qt 5 reference:
QVariantList QJsonArray::toVariantList() const
Converts this object to a QVariantList.
Returns the created map.
Upstream PySide2 reference signatures (binding differences may apply):
toVariantList(self) -> typing.List[typing.Any]
Source: https://doc.qt.io/archives/qt-5.15/qjsonarray.html#toVariantList