Commit 6a853cdf authored by Caroline Chao's avatar Caroline Chao Committed by The Qt Project
Browse files

Slider: Use forceActiveFocus() instead of focus = true


When activeFocusOnPress is true, activeFocus needs to be set on
Slider instead of the focus.

Change-Id: I73e512a84c3f890a12bea0f78cebd0769077cb6b
Reviewed-by: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
parent 8c27846b
Tags
No related merge requests found
Showing with 2 additions and 2 deletions
...@@ -221,8 +221,8 @@ Control { ...@@ -221,8 +221,8 @@ Control {
drag.maximumX: range.positionAtMaximum drag.maximumX: range.positionAtMaximum
onPressed: { onPressed: {
if (activeFocusOnPress) if (slider.activeFocusOnPress)
slider.focus = true; slider.forceActiveFocus();
// Clamp the value // Clamp the value
var current = __horizontal ? mouse.x : mouse.y var current = __horizontal ? mouse.x : mouse.y
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment