blob: bae7e999049e5466b8ea913a1b3d98dcf059d80b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [main_qml]
import QtQuick 2.6
import QtQuick.Controls 2.0
//![import]
import io.qt.examples.backend 1.0
//![import]
ApplicationWindow {
id: root
width: 300
height: 480
visible: true
//![backend]
BackEnd {
id: backend
}
//![backend]
//![username_input]
TextField {
text: backend.userName
placeholderText: qsTr("User name")
anchors.centerIn: parent
onEditingFinished: backend.userName = text
}
//![username_input]
}
//! [main_qml]
|