Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
6.7.2
-
84a618809 (dev)
Description
Problem can be observed in both QML Text and QTextEdit. So I suppose it is a problem in Qt support for rich text as a whole.
So first of all, <margin-*> is a supported property:
https://doc.qt.io/qt-6/richtext-html-subset.html#css-properties
also <span>
https://doc.qt.io/qt-6/richtext-html-subset.html#supported-tags
And actually using <span> with most of other CSS properties work just fine - except <margin-*>. 2 reproducers attached: one for QML and one for QWidget. Build with 6.7.2 and run them, then one can see that margin is missing. The same rich text should look like as what a browser shows:
But actually margin is not there. QTextEdit:
Quick:
Actually, one can see that all other properties (color, font, etc.) work correctly. But not <margin-*>.
Also, the problem seems to be related to combination of <span> and <margin-*>. For example, using <maring-*> like <p style='margin-left: 200px;'> is totally fine.
Attachments
For Gerrit Dashboard: QTBUG-127457 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
583775,2 | doc: Add a note about the difference between block/span properties | dev | qt/qtbase | Status: MERGED | +2 | 0 |