From ee6677dbea4d9ab3560e59b4eab1c7bc94d2f912 Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Fri, 24 Jun 2022 14:00:15 +0100 Subject: [PATCH] QStyledItemDelegate: Fix the event filter doc The class actually also avoids filtering the tab and backtab keys for the mentioned classes: QTextEdit and QPlainTextEdit. So, the documentation needs to be extended to cover the hidden gems. Change-Id: Id993b055a105c6cfe5ee57be3863ce8bff448396 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Volker Hilsheimer (cherry picked from commit 82309305a7869a5a7667bdd799d763a842cdf85b) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/itemviews/qstyleditemdelegate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp index 7a36a99a0e3..4cb25a3b19e 100644 --- a/src/widgets/itemviews/qstyleditemdelegate.cpp +++ b/src/widgets/itemviews/qstyleditemdelegate.cpp @@ -576,8 +576,9 @@ void QStyledItemDelegate::setItemEditorFactory(QItemEditorFactory *factory) \li \uicontrol Esc \endlist - If the \a editor's type is QTextEdit or QPlainTextEdit then \uicontrol Enter and - \uicontrol Return keys are \e not handled. + If the \a editor's type is QTextEdit or QPlainTextEdit then \uicontrol Tab, + \uicontrol Backtab, \uicontrol Enter and \uicontrol Return keys are \e not + handled. In the case of \uicontrol Tab, \uicontrol Backtab, \uicontrol Enter and \uicontrol Return key press events, the \a editor's data is committed to the model