From 988a3cd95da4b5875c7116141f2b22acf3e20502 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 17 Jan 2025 16:44:00 +0100 Subject: [PATCH] Doc: fix linking issue in QHeaderView; reflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QHeaderView has no resizeMode property, only a ResizeMode enum type that is then used in the sectionResizeMode API. Fix that reference, reflow the paragraph, and apply some light editing. Amends 9e3a96189d9db8a458e65cd5078509afe7a160db Pick-to: 6.9 Change-Id: I240c3f64fd45c96f4d3ba95c2086a638468e137f Reviewed-by: Christian Ehrlicher Reviewed-by: Thorbjørn Lund Martsum --- src/widgets/itemviews/qheaderview.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 61be6c14487..04727f2a511 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -130,16 +130,16 @@ static const int maxSizeSection = 1048575; // since section size is in a bitfiel \section1 Special consideration for huge models - The headerview uses 8 to 16 bytes of memory per section. - However, since Qt 6.9 this section memory is only used if one - or more sections are resized or reordered. This means that it's possible - for a model to have millions of sections without QHeaderView consuming a proportional, - and therefore huge, amount of memory, as long as there are \e no calls to - \l swapSections, \l resizeSection, \l hideSection, \l moveSection, - and \l stretchLastSection (enabling it). - In order to avoid such calls by user actions the \l resizeMode - should be fixed (without specifying it for any indexes as - that will do the opposite). The user should also be prevented from + The headerview uses 8 to 16 bytes of memory per section. However, since Qt + 6.9 this section memory is only used if one or more sections are resized or + reordered. This means that it's possible for a model to have millions of + sections without QHeaderView consuming a proportional, and therefore huge, + amount of memory, as long as there are \e no calls to \l swapSections, \l + resizeSection, \l hideSection, \l moveSection, and \l stretchLastSection + (enabling it). In order to avoid such calls by user actions the + \l{QHeaderView::sectionResizeMode}{resize mode} should be + \l{QHeaderView::ResizeMode}{Fixed} (without specifying it for any indexes, + as that will do the opposite). The user should also be prevented from moving sections by keeping \l sectionsMovable disabled. */