Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTextEdit change total alignment
mikefire345 last edited by
When there is no text selected in my QTextEdit, i want to be able to change the text alignment of all the text in my QTextEdit. Changing the alignment of QTextEdit seems to only change the first paragraph though. Is there a way to change all of the text at once? Thanks
leon.anavi last edited by
Move the cursor through all paragraphs and set their alignment. You can check the algorithm of "this solution in Python":http://www.thetoryparty.com/2009/05/14/fun-with-pyqt-setting-alignment-of-all-paragraphs-in-a-qtextedit/ and to port it to C++.