From 5e9e4ccdc363297f70d4ebfbbb3e279670eca553 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 25 Sep 2017 13:03:25 +0200 Subject: Add an option to scroll the QComboBox on macOS with the mouse wheel Since there may be some applications that want to make their comboboxes scrollable or not with the mouse wheel then a style hint is added to make this toggable. It defaults to true for all platforms except macOS to keep it in line with existing behavior. [ChangeLog][QtWidgets][QStyle] Added SH_ComboBox_AllowWheelScrolling as a style hint to enable/disable the use of the mouse wheel in a QComboBox. This defaults to true in all styles except the macOS one so there is no change in existing behavior. Task-number: QTBUG-53094 Change-Id: I6eb61e1990bfc79e3b3ea82d7b91ee39096fa077 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Gabriel de Dietrich Reviewed-by: Andy Nichols --- src/plugins/styles/mac/qmacstyle_mac.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/styles') diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index aee258fda0..e540ff4d3b 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -2963,6 +2963,9 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w // min/max/close buttons on windows don't show tool tips ret = false; break; + case SH_ComboBox_AllowWheelScrolling: + ret = false; + break; default: ret = QCommonStyle::styleHint(sh, opt, w, hret); break; -- cgit v1.2.3