Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QPlainTextEdit for single line of input

Tags:

qt

I'm using Qt to write a database type program where the majority of inputs will be single lines, not documents of arbitrary length.

Do I understand correctly that QPlainTextEdit is the most appropriate widget for this kind of input?

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

Height to the right value to comfortably hold one line of text in the current font, instead of stretching to fill available space.

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

like image 813
rwallace Avatar asked Dec 09 '09 10:12

rwallace


1 Answers

Take a look at the QLineEdit class.

like image 129
Georg Schölly Avatar answered Sep 28 '22 10:09

Georg Schölly