Fixing bug with TextInput allowing unallowed characters.
This commit is contained in:
parent
ca51f979b8
commit
f229dc014c
1 changed files with 3 additions and 0 deletions
|
@ -112,6 +112,9 @@ Item {
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
horizontalAlignment: control.label == "" ? TextInput.AlignLeft : TextInput.AlignHCenter
|
horizontalAlignment: control.label == "" ? TextInput.AlignLeft : TextInput.AlignHCenter
|
||||||
color: sysPalette.windowText
|
color: sysPalette.windowText
|
||||||
|
validator: RegExpValidator {
|
||||||
|
regExp: control.isInt ? /-?[0-9]+/ : control.isDouble ? /-?[0-9]+(\.[0-9]+)?/ : /.+/
|
||||||
|
}
|
||||||
focus: true
|
focus: true
|
||||||
text: control.defValue
|
text: control.defValue
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
|
Loading…
Reference in a new issue