Skip to content

Slider value update not working after dragging #8327

Answered by FloVanGH
J0hannes101 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
and thank you for your report.

I have converted this into a discussion because it's not a bug. To get it to work you need to use a two-way binding.

I have adjusted your code so that it works:

import { VerticalBox, Slider, Button } from "std-widgets.slint";

export component AppWindow inherits Window {

    in property <float> slider_value <=> slider.value;
    
    VerticalLayout {
        Text {
            text: "Slider Value: " + slider_value;
        }
        
        slider := Slider {
            minimum: 0;
            maximum: 100;
        }

    }
}
use std::error::Error;
use std::time::Duration;

slint::include_modules!();

fn main() -> Result<(), Box<dyn Error>> {
    let

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@J0hannes101
Comment options

Answer selected by J0hannes101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8322 on May 02, 2025 06:37.