Doc: Wrap code snippet in \code \endcode

Fixes: QTBUG-129999
Change-Id: I0f7b25630a1e6f97453806ad778e90f610de0fa9
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
(cherry picked from commit 9b11c3736e9ff23b0febce80c3f488099f1229fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Paul Wicking 2024-10-14 18:40:48 +02:00 committed by Qt Cherry-pick Bot
parent 308181e875
commit 72a340570b

View File

@ -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.