TextInputUnit : how to write uppercase letter without clicking "Caps Lock" from the keyboard
-
TextInputUnit {
id: pilotName
x: 231
y: 396
width: 199
height: 62
parameter: "Pilot Name"
value:""
isEditable: true
unitEnabled: false
allCapsEnabled: true
showValidationState: true
validator : RegExpValidator{ regExp: /^[A-Z]{6}$/ }
}here am using textinput, value will be the input .
I want to show directly uppercase letters if user type without clicking the Caps Lock,
Note :- I cant use textInput here , Hoping for answers regarding TextInputUnit only. -
Hi and welcome to the Qt Forum.
Please use the code formatting tags, when you post code.here am using textinput, value will be the input .
TextInput
hasFont.AllUppercase
.
TextInputUnit
: Maybe one of my blind spots - I have no idea what that is. Which version of Qt are you using? -
I forgot to mentioned this ,I am Using TextInputUnit as component ,
here is the TextInputUnit.qml , i have added the Font.AllUppercase
TextInput {
id: textInput
text: value
focus: true
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.leftMargin: 10
anchors.right: unitsRect.left
verticalAlignment: Text.AlignVCenter
color: '#EBF4FF'
font.family: 'Lato'
font.pixelSize: 16
font.capitalization: Font.AllUppercaseselectByMouse: true
// validator: validatorIn
onEditingFinished: {
root.textChanged()
}
readOnly: readonly
}but still its not working . What will be the issue