qml input box

basic concept

This is a very commonly used function, specifically recorded:

Generally, two input boxes are used, one is TextInput and the other is TextField.

Because if TextInput and Rectangle are too long, there will be a problem, that isText will be input outside the Rectangle.

You can use TextField instead, or you can limit its length !

 

Both TextInput and TextField contain an attribute:maximumLength

The text run length beyond the length is truncated maximumLength default value of 32767 TextInput, and no default TextField.

 

Here is how to set the echo mode:

A TextInput as an example:

  • TextInput.Normal: display text directly (default mode);

  • TextInput.Password: Use password mask characters (different display effects depending on different platforms) to replace real characters

  • TextInput.NoEcho: Does not display the input content;

  • TextInput.PasswordEchoOnEdit: Use password mask characters, but display real characters as you type.

 

Wow
Published 206 original articles · praised 18 · 70,000 views

Guess you like

Origin blog.csdn.net/lvmengzou/article/details/105584021