J
J
jkovalenko2021-11-01 21:56:53
Python
jkovalenko, 2021-11-01 21:56:53

How can I make QLineEdit's typing field to be limited to the size of the field?

The essence of the problem: in QLineEdit, typing starts in the middle and if there is not enough space, then it continues to be typed outside it like this:
618038aecb1c2191904210.jpeg
however, I need the text to start typing on line 1, and if there is not enough space, then move to line 2 and etc. Like this :
618038cf98d10202238325.jpeg
How can this be done? Or do I need to choose another widget for input?

Edit: Wrong screenshots at first, sorry

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-11-01
@jkovalenko

You need a QTextEdit. As the name suggests, QLineEdit is designed for single line input.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question