Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_qml_qqmlpropertymap.cpp
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4//! [0]
6{
7 Q_OBJECT
8 QML_NAMED_ELEMENT(MyQmlPropertyMap)
9public:
10 explicit MyQmlPropertyMap(QObject *parent = nullptr)
11 : QQmlPropertyMap(this, parent)
12 {
13 insert("name", "John Smith");
14 insert("phone", "555-5555");
15 insert("email", "john.smith@example.com");
16 }
17
18public slots:
20 {
21 insert("email", newEmail);
22 }
23};
24//! [0]
25
26void wrapper1() {
27//! [1]
28 QQuickView view;
29 view.setSource(QUrl("qrc:/main.qml"));
30 view.show();
31//! [1]
32}
void wrapper1()
[0]