From 72a340570bff2530759da6bbfc014104eb69baee Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Mon, 14 Oct 2024 18:40:48 +0200 Subject: [PATCH] Doc: Wrap code snippet in \code \endcode Fixes: QTBUG-129999 Change-Id: I0f7b25630a1e6f97453806ad778e90f610de0fa9 Reviewed-by: Andreas Eliasson Reviewed-by: Marcus Tillmanns (cherry picked from commit 9b11c3736e9ff23b0febce80c3f488099f1229fc) Reviewed-by: Qt Cherry-pick Bot --- src/gui/text/qtexttable.cpp | 2 ++ 1 file changed, 2 insertions(+) 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.