I am using QTextdocument and in my text there are "\n" for new line characters but QTextDocument is not handling it and it shows it as plain 1 line .
Is there any way we can make it handle "\n" as new line character, along with that I need eliding also.
So whenever any text is there after line break it should show "..."

E.g. This

Currently QText document removed line breaks and shows it as "This is the sample"
2nd issue is for eliding Now suppose only 1 line is visible it should show it as "This..."
How do I achieve this?