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
6...
7QJSValueIterator it(object);
8while (it.hasNext()) {
9 it.next();
10 qDebug() << it.name() << ": " << it.value().toString();
11}
13
14
16QJSValue obj = ...; // the object to iterate over
17while (obj.isObject()) {
19 while (it.hasNext()) {
20 it.next();
21 qDebug() << it.name();
22 }
23 obj = obj.prototype();
24}
26
The QJSValueIterator class provides a Java-style iterator for QJSValue.
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition qjsvalue.h:31
QSet< QString >::iterator it
#define qDebug
[1]
Definition qlogging.h:164
GLhandleARB obj
[2]
QJSValue object
[0]