delay update from handle
we must wait the handle updated its size too for being able to correctly update range position from handle position
This commit is contained in:
parent
8cdf691438
commit
6dd904d239
@ -156,16 +156,8 @@ Item {
|
||||
}
|
||||
Connections {
|
||||
target: internalLoader.item.handle
|
||||
onYChanged: {
|
||||
if (internalLoader.isVertical) {
|
||||
range.position = internalLoader.item.handle.y
|
||||
}
|
||||
}
|
||||
onXChanged: {
|
||||
if (!internalLoader.isVertical) {
|
||||
range.position = internalLoader.item.handle.x
|
||||
}
|
||||
}
|
||||
onYChanged: updateFromHandleTimer.running = true
|
||||
onXChanged: updateFromHandleTimer.running = true
|
||||
}
|
||||
RangeModel {
|
||||
id: range
|
||||
@ -219,6 +211,18 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: updateFromHandleTimer
|
||||
interval: 10
|
||||
onTriggered: {
|
||||
if (internalLoader.isVertical) {
|
||||
range.position = internalLoader.item.handle.y
|
||||
} else {
|
||||
range.position = internalLoader.item.handle.x
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
source: interactive ? "private/ScrollBarDelegate.qml" : "private/ScrollDecoratorDelegate.qml"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user