QPlainTextEdit for one line of input

I use Qt to write a program such as a database, where most of the inputs will be single and not documents of arbitrary length.

Do I understand correctly that QPlainTextEdit is the most suitable widget for this input?

If so, how do you set the parameters for this input? In particular:

Height to the right to conveniently hold one line of text in the current font, rather than stretch to fill the free space.

Keys

Enter / cursor-down moves to the next control instead of the next line in the document.

+5
source share
1 answer

Take a look at the class QLineEdit.

+11
source

All Articles