Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_script_qjsvalueiterator.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
5
QJSValue
object
;
6
...
7
QJSValueIterator
it
(
object
);
8
while
(
it
.hasNext()) {
9
it
.next();
10
qDebug
() <<
it
.name() <<
": "
<<
it
.value().toString();
11
}
13
14
16
QJSValue
obj
= ...;
// the object to iterate over
17
while
(
obj
.isObject()) {
18
QJSValueIterator
it
(
obj
);
19
while
(
it
.hasNext()) {
20
it
.next();
21
qDebug
() <<
it
.name();
22
}
23
obj
=
obj
.prototype();
24
}
26
QJSValueIterator
The QJSValueIterator class provides a Java-style iterator for QJSValue.
Definition
qjsvalueiterator.h:18
QJSValue
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition
qjsvalue.h:31
it
QSet< QString >::iterator it
Definition
doc_src_qset.cpp:85
qDebug
#define qDebug
[1]
Definition
qlogging.h:164
obj
GLhandleARB obj
[2]
Definition
qopenglext.h:4164
object
QJSValue object
[0]
Definition
src_script_qjsvalueiterator.cpp:5
qtdeclarative
src
qml
doc
snippets
code
src_script_qjsvalueiterator.cpp
Generated by
1.10.0