From 5dd4f18cef4fb9ae1e121622c793396e7f132924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Wed, 13 Mar 2019 15:55:01 +0100 Subject: [PATCH] Improve documentation for opaque resize in QSplitter This also fixes the documentation for QStyle::SH_Splitter_OpaqueResize Change-Id: If8afb52ae300e9735a8bc6b065327f17d67f4323 Reviewed-by: Paul Wicking --- src/widgets/styles/qstyle.cpp | 4 ++-- src/widgets/widgets/qsplitter.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index ac4fb7fbd1..97ec1d3f19 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -1971,8 +1971,8 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SH_Widget_Animate Deprecated. Use \l{SH_Widget_Animation_Duration} instead. - \value SH_Splitter_OpaqueResize Determines if resizing is opaque - This enum value has been introduced in Qt 5.2 + \value SH_Splitter_OpaqueResize Determines if widgets are resized dynamically (opaquely) while + interactively moving the splitter. This enum value was introduced in Qt 5.2. \value SH_TabBar_ChangeCurrentDelay Determines the delay before the current tab is changed while dragging over the tabbar, in milliseconds. This diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp index 9e38c8f18a..3b516f36b6 100644 --- a/src/widgets/widgets/qsplitter.cpp +++ b/src/widgets/widgets/qsplitter.cpp @@ -161,11 +161,10 @@ Qt::Orientation QSplitterHandle::orientation() const /*! - Returns \c true if widgets are resized dynamically (opaquely), otherwise - returns \c false. This value is controlled by the QSplitter. + Returns \c true if widgets are resized dynamically (opaquely) while interactively moving the + splitter. Otherwise returns \c false. This value is controlled by the QSplitter. \sa QSplitter::opaqueResize() - */ bool QSplitterHandle::opaqueResize() const { @@ -1483,7 +1482,8 @@ int QSplitter::closestLegalPosition(int pos, int index) /*! \property QSplitter::opaqueResize - \brief whether resizing is opaque + Returns \c true if widgets are resized dynamically (opaquely) while interactively moving the + splitter. Otherwise returns \c false. The default resize behavior is style dependent (determined by the SH_Splitter_OpaqueResize style hint). However, you can override it