Ask / Submit
3

Text field and keyboard on focus

asked 2014-08-02 18:03:07 +0200

Alin gravatar image

updated 2014-08-12 00:29:43 +0200

I am tinkering with a real time public transport application... I have a serchField at the moment that takes bus numbers (2-3 numbers + optionally a letter) and bus stop numbers... only numbers.

My question is... Is there any way to make the general keyboard that appears when the focus is on the search field to start with the symbol key activated? ()

now now

how I would like it to start now

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
0

answered 2014-08-11 18:28:58 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2018-12-21 17:17:23 +0200

Tanghus gravatar image

Use eg. inputMethodHints: Qt.ImhFormattedNumbersOnly in the SearchField. It inherits from TextFieldso those properties can be used too: https://sailfishos.org/sailfish-silica/qml-sailfishsilica-textfield.html#inputMethodHints-prop

Correct URL: https://sailfishos.org/develop/docs/silica/qml-sailfishsilica-sailfish-silica-textfield.html/#inputMethodHints-prop

edit flag offensive delete publish link more

Comments

and how I will introduce letters with that keyboard?

Alin ( 2014-08-12 00:34:36 +0200 )edit

You can't have both, hence the Only in Qt.ImhFormattedNumbersOnly.

Tanghus ( 2014-08-12 00:45:45 +0200 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2014-08-02 18:03:07 +0200

Seen: 485 times

Last updated: Dec 21 '18