Some imperative code that could go into Connections
onWidthChanged: { if (oldWidth === 0) { oldWidth = width; return } let desiredPercent = slider.x * 100 / (oldWidth - 32) slider.x = desiredPercent * (width - 32) / 100 oldWidth = width }
Otherwise seems to work.