summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Wicking <[email protected]>2024-10-14 18:40:48 +0200
committerPaul Wicking <[email protected]>2024-10-15 17:25:47 +0200
commit9b11c3736e9ff23b0febce80c3f488099f1229fc (patch)
treeb34e807015df454af3394d76f127b7302ff5b6bc
parent101d0b20e4ba62c375f1ad3860d1561537f143df (diff)
Doc: Wrap code snippet in \code \endcode
Fixes: QTBUG-129999 Pick-to: 6.8 Change-Id: I0f7b25630a1e6f97453806ad778e90f610de0fa9 Reviewed-by: Andreas Eliasson <[email protected]> Reviewed-by: Marcus Tillmanns <[email protected]>
-rw-r--r--src/gui/text/qtexttable.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index 64b7aa6765a..683ad8ac352 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -72,10 +72,12 @@ using namespace Qt::StringLiterals;
Sets the cell's character format to \a format. This can for example be used to change
the background color of the entire cell:
+ \code
QTextTableCell cell = table->cellAt(2, 3);
QTextCharFormat format = cell.format();
format.setBackground(Qt::blue);
cell.setFormat(format);
+ \endcode
Note that the cell's row or column span cannot be changed through this function. You have
to use QTextTable::mergeCells and QTextTable::splitCell instead.