How to get Intput from TextInput upon pressing the done button on Android keyborad.[solved]
-
@vishnucool220 Did you try setting
inputMethodHints
as said earlier ? -
@p3c0
inputMethodHints: Qt.ImhDigitsOnly work perfect. Now i accepts only digits. But the user can give me than the range specified in the validator. not working both on windows and android. -
@vishnucool220 And what is that range ?
-
@p3c0
inputvalidate: DoubleValidator{bottom: -1500;top: 1500;decimals: 1000} -
@vishnu try changing notation property to StandardNotation
-
@p3c0
perfect but the problem is it accepting till 4 digits. i.e Even though my top value :1500 .user can put till 9999.Any solution ? -
@vishnu Hmm that is expected behavior. From the docs:
Input is accepected but invalid if it contains a double that is outside the range or is in the wrong format; e.g. with too many digits after the decimal point or is empty.
In this case use the
accepted
signal to check the validity of the input. It won't trigger if the number is not in that range.TextInput{ validator: DoubleValidator { bottom: -1500; top: 1500; decimals: 1000; notation: DoubleValidator.StandardNotation } onAccepted: console.log("Accepted") //won't trigger if not input not valid }
-
@p3c0
Perfect. Instead on poping up new thread .I want to ask here itself. when ever i press on the TextInput Box on Android . These were shown on the application output. What does it mean ? Is something wrong ?
W/IInputConnectionWrapper( 7920): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper( 7920): endBatchEdit on inactive InputConnection
W/IInputConnectionWrapper( 7920): showStatusIcon on inactive InputConnection
W/IInputConnectionWrapper( 7920): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper( 7920): endBatchEdit on inactive InputConnection
W/IInputConnectionWrapper( 7920): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper( 7920): endBatchEdit on inactive InputConnection -
@vishnu No. I guess they are debug messages from functions in android's apis.
-
@p3c0
Okay.