-1

The answer is probably really simple but I searched like 30 mins and couldn't find anything. I just want to set QLineEdit like what does \n do. To be more specific, when I start to type in QLineEdit, if it's a long sentence and bigger than the width of QLineEdit, it's going straight like forever. I want to start it on a new line when the text is reach end of the QLineEdit box. Even I press enter while typing, it does not go to a new line. How can I fix this? Is QLineEdit only 1 row and doesn't go bottom line?

GLHF
  • 3,835
  • 10
  • 38
  • 83

1 Answers1

0

The "Line" is right there in its name, so yes, it supports "only 1 row".

The QLineEdit widget is a one-line text editor.

What you want is QPlainTextEdit or QTextEdit if you need styling.

Aleksei Zabrodskii
  • 2,220
  • 3
  • 19
  • 41