QConstIterator 允许迭代容器在 QVariant . 更多...
头: | #include <QConstIterator> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Since: | Qt 6.0 |
继承: | QBaseIterator |
QConstIterator (const QIterable<Container> * iterable , void * iterator ) | |
bool | operator!= (const QConstIterator<Container> & other ) const |
QConstIterator<Container> | operator+ (qsizetype j ) const |
QConstIterator<Container> & | operator++ () |
QConstIterator<Container> | operator++ (int) |
QConstIterator<Container> & | operator+= (qsizetype j ) |
QConstIterator<Container> | operator- (qsizetype j ) const |
qsizetype | operator- (const QConstIterator<Container> & j ) const |
QConstIterator<Container> & | operator-- () |
QConstIterator<Container> | operator-- (int) |
QConstIterator<Container> & | operator-= (qsizetype j ) |
bool | operator== (const QConstIterator<Container> & other ) const |
另请参阅 QIterator and QIterable .
[explicit]
QConstIterator::
QConstIterator
(const
QIterable
<
Container
> *
iterable
,
void
*
iterator
)
创建 QConstIterator 以包裹 iterator ,操作 iterable .
返回
true
if
other
指向与此迭代器不同的项;否则返回
false
.
另请参阅 operator== ().
Returns an iterator to the item at j positions forward from this iterator.
另请参阅 operator- () 和 operator+= ().
The prefix
++
operator (
++it
) advances the iterator to the next item in the container and returns an iterator to the new current item.
Calling this function on QIterable <Container>::end() leads to undefined results.
另请参阅 operator-- ().
这是重载函数。
The postfix
++
operator (
it++
) advances the iterator to the next item in the container and returns an iterator to the previously current item.
Advances the iterator by j 项。
另请参阅 operator-= () 和 operator+ ().
Returns an iterator to the item at j positions backward from this iterator.
If the container in the QVariant does not support bi-directional iteration, calling this function leads to undefined results.
另请参阅 operator+ (), operator-= (),和 QIterable::canReverseIterate ().
Returns the distance between the two iterators.
另请参阅 operator+ (), operator-= (),和 QIterable::canReverseIterate ().
The prefix
--
operator (
--it
) makes the preceding item current and returns an iterator to the new current item.
Calling this function on QIterable <Container>::begin() leads to undefined results.
If the container in the QVariant does not support bi-directional iteration, calling this function leads to undefined results.
另请参阅 operator++ () 和 QIterable::canReverseIterate ().
这是重载函数。
The postfix
--
operator (
it--
) makes the preceding item current and returns an iterator to the previously current item.
If the container in the QVariant does not support bi-directional iteration, calling this function leads to undefined results.
另请参阅 QIterable::canReverseIterate ().
Makes the iterator go back by j 项。
If the container in the QVariant does not support bi-directional iteration, calling this function leads to undefined results.
另请参阅 operator+= (), operator- (),和 QIterable::canReverseIterate ().
返回
true
if
other
points to the same item as this iterator; otherwise returns
false
.
另请参阅 operator!= ().