On Sonntag, 11. November 2018 16:13:12 CET coroberti . wrote: > On Sun, Nov 11, 2018 at 5:06 PM Allan Sandfeld Jensen <k...@carewolf.com> wrote: > > On Sonntag, 11. November 2018 14:11:52 CET coroberti . wrote: > > > Hi, > > > 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. > > > > 'Allan > > Hi Allan, > Thanks, but It seems that only this HTML/CSS subset is supported: > > http://doc.qt.io/qt-5/richtext-html-subset.html > Right, line-height isn't mentioned there, but considering the C++ side of the CSS implementation (QTextBlockFormat) has it, it might just have left out. I would give it a shot.
'Allan _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest