diff options
author | Eskil Abrahamsen Blomfeldt <[email protected]> | 2024-08-19 13:31:06 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <[email protected]> | 2024-08-19 20:14:44 +0200 |
commit | 84a618809a1fa53ef2c2a4a73604a3d14f5607ca (patch) | |
tree | ef896fde72c25264f15c4c6fc434ef76a4cb48b3 | |
parent | 7c7b34f76a78fb144600002c0aebe031e3dd42e9 (diff) |
doc: Add a note about the difference between block/span properties
QTextDocument has different formatting options for spans and blocks,
which means that some CSS properties will be ignored if applied to
a span, even though they might be respected by a full-blown web
browser.
Since this can be surprising to users, we add a note about it to the
overview of supported HTML.
Task-number: QTBUG-127457
Change-Id: I55ccb039849d3ce55b9bfb8be21b6e8d276b86cd
Reviewed-by: Eirik Aavitsland <[email protected]>
-rw-r--r-- | src/gui/doc/src/richtext.qdoc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/doc/src/richtext.qdoc b/src/gui/doc/src/richtext.qdoc index 10d99628500..88c6a1137f5 100644 --- a/src/gui/doc/src/richtext.qdoc +++ b/src/gui/doc/src/richtext.qdoc @@ -1249,6 +1249,11 @@ \endlist \endtable + \note Certain CSS properties are only supported when applied to a block tag, such as \c{<p>}. + Setting these properties on a \c{<span>}, for instance, will have no effect. The margin is one + example of such a property. See QTextBlockFormat and QTextCharFormat for an overview of the + formatting options available on blocks and spans in QTextDocument. + \section1 Qt-specific CSS properties Besides the standard CSS properties listed earlier, the following |