-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMTextField.qml
More file actions
45 lines (39 loc) · 1.18 KB
/
MTextField.qml
File metadata and controls
45 lines (39 loc) · 1.18 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
import QtQuick 2.7
import QtQuick.Controls 2.2
Item {
property string _placeholderText: "e.g. 25320"
property int _width: 100
property int _height: 50
property string _text: "0"
property TextInput textInput: mTextField1
// signal textChanged()
width: _width
height: _height
// TextInput {
// id: control
//// placeholderText: qsTr(_placeholderText)
//// background: Rectangle {
//// implicitWidth: _width
//// implicitHeight: _height
//// color: control.enabled ? "transparent" : "#353637"
//// //border.color: control.enabled ? "#EFECCA" : "transparent"
//// //radius: 2
//// }
//// horizontalAlignment: Text.AlignHCenter
//// verticalAlignment: Text.AlignVCenter
// //onTextChanged: textChanged()
//// onReleased: {
//// text: _text
//// }
// }
TextInput {
id: mTextField1
width: _width
height:_height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: "#EFECCA"
text: _text
onTextChanged: _text = mTextField1.text
}
}