1  import QtQuick 2.12
2  import QtQuick.Window 2.12
3  import QtQuick.Controls 2.5
4  Window {
5    width: 640
6    height: 700
7    visible: true
8    title: qsTr("TextInput and TextArea")
9    function func1() {
10        var msg = "\nUser name: ";
11        msg += username.text + "\n"
12        msg += "Password :"
13        msg += pass.text + "\n"
14        msg += "Description : "
15        msg += desc.text
16        print (msg);
17   }
18   Column {
19        spacing : 10
20        Row {
21           id: row1
22           spacing: 40
23           Label {
24               width: 60
25               font.pixelSize: 16
26               text: "User name: "
27           }
28           Rectangle {
29            width: 200
30            height: 30
31            border.color:"green"
32            TextInput {
33               id:username
34               font.pixelSize: 20
35               width: 200
36            }
37          }//end of receangle
38          Rectangle {
39            width: 100
40            height: 30
41            border.color:"green"
42           Button {
43               font.pixelSize: 20
44               width: 100
45               text: "Submit"
46               onClicked: func1()
47            }
48          }//end of receangle
49        }//end of row1
50        Row {
51            id: row2
52            spacing: 40
53            Label {
54                width:60
55                font.pixelSize: 16
56                text: "Password: "
57          }
58          Rectangle {
59          width: 200
60          height: 30
61          border.color:"green"
62          TextInput {
63              id: pass
64              font.pixelSize: 20
65              width: 200
66          }
67        }
68       }//end of row 2
69       Rectangle {
70            width: 640
71            height: 600
72            border.color:"red"
73            border.width: 2
74            TextArea {
75                id: desc
76                placeholderText: "Write description here "
76                placeholderTextColor: "blue"
77                font.pixelSize: 20
78            }
79       } //end of rectangle
80    }//end of column
81 } // end of window
