Solved QTextDocument: Style vs. Attribute
-
Hi All!
In my example https://github.com/Schachigel/QtLetter where I work with QTextDocuments I found, that the following html in a QTextDocument works:<p align=justify>...</p>
whereas this version - which I would consider the same - does not:
<p style='text-align:justify;'> ...
Actually the second one creats rather strange results. Any ideas on this?
Best regards
Holger -
@HoMa
According to the reference page cited by @Christian-Ehrlicher, QSS does not recognizestyle='text-align:...'
. The<p align=justify>
is recognized. Unfortunately the truth is that Qt's ownsetHtml()
methods should really be namedsetRichText()
, and you do have to use the reference page to check which HTML constructs are/are not supported. -
-
@HoMa
According to the reference page cited by @Christian-Ehrlicher, QSS does not recognizestyle='text-align:...'
. The<p align=justify>
is recognized. Unfortunately the truth is that Qt's ownsetHtml()
methods should really be namedsetRichText()
, and you do have to use the reference page to check which HTML constructs are/are not supported. -
Rtfm, I get it. There it says „block attribute“ align is supported. But text-align not ...
Thx and sorry...