forked from qt-creator/qt-creator
QComboBox: not accept wheel events for changing values
It is dangerous for combo boxes within scroll views especially. Fixes: QTCREATORBUG-28103 Change-Id: Ibed498658ce9d6f5b90f6d7e8ec7c4f2bbd015aa Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -390,6 +390,10 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const
|
||||
if (widget && widget->inherits("QTreeView"))
|
||||
ret = 0;
|
||||
break;
|
||||
case QStyle::SH_ComboBox_AllowWheelScrolling:
|
||||
// Turn this off completely to prevent accidental current index change on a scroll view
|
||||
ret = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user