From 07ad8c844439d397a8f6ccd87dee7fbfc237f729 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 14 Dec 2024 13:30:17 +0100 Subject: [PATCH] QStyleOptionViewItem: document 'widget' and 'locale' member These two members were added during Qt4 times but never documented. Pick-to: 6.8 6.5 Change-Id: Ife4abfc6d8883f4c26ce5b95d5c0cfd3adcbd6bf Reviewed-by: Volker Hilsheimer Reviewed-by: Wladimir Leuschner Reviewed-by: Samuel Gaist (cherry picked from commit a90d9f4823bd6baf4cb660a942c2b1695441dbbd) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/styles/qstyleoption.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp index 5f0949dd3f2..27e66b7cb6c 100644 --- a/src/widgets/styles/qstyleoption.cpp +++ b/src/widgets/styles/qstyleoption.cpp @@ -2947,6 +2947,23 @@ QStyleOptionTitleBar::QStyleOptionTitleBar(int version) \sa QStyle::SH_ItemView_ShowDecorationSelected, QAbstractItemView */ +/*! + \variable QStyleOptionViewItem::locale + \brief the locale to use for displaying text, numbers and dates. + + This allows the style to display e.g. dates in a different locale than + the default locale of the application. +*/ + +/*! + \variable QStyleOptionViewItem::widget + \brief the parent widget of the item + + This member contains the parent widget (itemview) of the item to + be able to e.g. access some properties within the QStyledItemDelegate + methods. +*/ + /*! \variable QStyleOptionViewItem::textElideMode \brief where ellipsis should be added for text that is too long to fit