Slider: handle doesn't follow value when changing maximumValue

asked 2013-12-30 23:33:08 +0300

iZero gravatar image

When slider handle is shown and slider's maximumValue property is changed, the handle doesn't follow the value but stays in place. Quick way to demonstrate this is to take the default example app from SDK and replace the first page with this code:

import QtQuick 2.0
import Sailfish.Silica 1.0


Page {
    id: page

    SilicaFlickable {
        anchors.fill: parent

        Column {
            id: column
            width: page.width
            spacing: Theme.paddingLarge
            Slider {
                id: slider1
                width: parent.width
                maximumValue: 50
                value: 25
            }
            Slider {
                id: slider2
                width: parent.width
                minimumValue: 25
                maximumValue: 250
                value: 50
                onValueChanged: {
                    slider1.maximumValue = value
                }
            }
        }
    }
}
edit retag flag offensive close delete