Solved QTextEdit alignment doesn't work
-
Hello I have a QTextEdit and used setAlignment(Qt::AlignCenter); on the constructor.
Later I used setText(QString); but the string is aligned to the left. What should I do?
-
Hi
Since QTextEdit works in paragraphs, you need to set alignment for each
https://stackoverflow.com/questions/25855024/aligning-text-in-qtextedit -
@mrjj said in QTextEdit alignment doesn't work:
Hi
Since QTextEdit works in paragraphs, you need to set alignment for each
https://stackoverflow.com/questions/25855024/aligning-text-in-qtexteditThank you for the reply. Since I only need a single line instead of paragraphs, I'll switch to QLineEdit. That would surely make things much easier.