QLabel auto multiple lines

If I understood your question correctly, you should use the setWordWrap function for your label, with true as its parameter.

QLabel lbl("long long string");
lbl.setWordWrap(true);

In order to show multiple lines in QLabel, right click on QLabel and select 'change rich text'. This brings up dialog where you can type the text as you want to see including enter key. Setting the word wrap is not required for this.

If you set the word wrap as well (in QLabel properties) than it will wrap each individual line in the Qlabel if it was longer than the real estate.

enter image description here

Tags:

Qt

Qlabel