summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r--src/widgets/widgets/qcombobox.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index b743af2569..4e8668b001 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -3350,11 +3350,11 @@ void QComboBox::keyReleaseEvent(QKeyEvent *e)
#if QT_CONFIG(wheelevent)
void QComboBox::wheelEvent(QWheelEvent *e)
{
-#ifdef Q_OS_DARWIN
- Q_UNUSED(e);
-#else
Q_D(QComboBox);
- if (!d->viewContainer()->isVisible()) {
+ QStyleOptionComboBox opt;
+ initStyleOption(&opt);
+ if (style()->styleHint(QStyle::SH_ComboBox_AllowWheelScrolling, &opt, this) &&
+ !d->viewContainer()->isVisible()) {
const int rowCount = count();
int newIndex = currentIndex();
@@ -3374,7 +3374,6 @@ void QComboBox::wheelEvent(QWheelEvent *e)
}
e->accept();
}
-#endif
}
#endif