blob: 7bad89374f5e8f7d5115b8da80dfa9bee608554c (
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
import QtQuick.Controls
//![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]
|