forked from qt-creator/qt-creator
Core: Set the SH_Slider_AbsoluteSetButtons style for QSlider
This way when the user clicks on the slider with the mouse the slider jumps under the mouse and not left and right according to the slider page. Change-Id: If36f9d8ea82f5b200e2322758f4fc25aef5e1a04 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -442,6 +442,10 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const
|
||||
ret = QGuiApplication::keyboardModifiers()
|
||||
== (HostOsInfo::isMacHost() ? Qt::MetaModifier : Qt::ControlModifier);
|
||||
break;
|
||||
case QStyle::SH_Slider_AbsoluteSetButtons:
|
||||
// Make QSlider jump on left mouse click
|
||||
ret = Qt::LeftButton | Qt::MiddleButton | Qt::RightButton;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user