PDA

View Full Version : auto new line in QLineEdit



wagmare
26th March 2014, 04:55
hi friends/Expert,

is is possible to automatic new line in lineEdit when user enters the text in it . if the text length exceeds certain length new line has to be added automatically. is it possible in lineEdit .

Thanks in advance

ChrisW67
26th March 2014, 05:35
QLineEdit is a single line editing widget.

With QTextEdit (or QPlainTextEdit) and a suitable QTextEdit::wordWrapMode() the text will be wrapped for display in the visible area of the widget but new line characters are not inserted in the actual text unless the user types them or your code inserts them.