[Development] QTextEdit - Line Spacing
Allan Sandfeld Jensen
kde at carewolf.com
Sun Nov 11 16:06:27 CET 2018
On Sonntag, 11. November 2018 14:11:52 CET coroberti . wrote:
> It seems that arranging line spacing for text in QTextEdit (like 1.5,
> 2, 3 lines) is not an easy coding.
> Any code samples, directions, howtos would be very much appreciated.
There is probably a way to get to the default or root QTextBlockFormat and set
lineHeight on it, but I couldn't spot the logical way from QTextEdit either;
but you can always just do it in CSS and set the CSS as the default style-
sheet on the document the QTextEdit is showing. Remember a QTextEdit is
basically showing HTML, so you can do it like you would in HTML.
More information about the Development