1

Topic: Vertically center aligned indepedant text

Good day all

It is possible to have text center aligned vertically. I have used some simple HTML to center align the text. In the editor the text is center aligned, but the final text is still left aligned. Currently I create multiline texts and pad them with spaces to center align vertically


Below is autogenerated HTML for attached image

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Fira Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A Description of equipment</p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">wrapped into multiline and center</p>
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">aligned vertically</p></body></html>

2

Re: Vertically center aligned indepedant text

The attachment did not load

Post's attachments

Attachment icon Screenshot 2025-05-07 135142.png 29.34 kb, 1 downloads since 2025-05-07 

3

Re: Vertically center aligned indepedant text

Should be supported according to this resource from the underlying QT implementation:

https://doc.qt.io/qt-6/richtext-html-subset.html

Have you tried settings the width to 100% on the paragraphs?  You have three distinct paragraphs, which should align wrapped lines centered.  But if each paragraph only contains one line, it will not wrap.  And each paragraph is probably left-aligned within its parent, not even taking the full width into account.