Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Slider in QML

    QML and Qt Quick
    2
    5
    972
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sushma_MP last edited by

      Hi everyone,

      Can some one help me to implement slider movement in QML

      1 Reply Last reply Reply Quote 0
      • M
        mostefa last edited by

        Hi @Sushma_MP

        Have a look at

        http://doc.qt.io/qt-5/qml-qtquick-controls-slider.html#details

        You can have something like this, for example:

        Slider {
            id: firstSlider
            maximumValue: 5.0
            stepSize: 1.0
        }
        
        1 Reply Last reply Reply Quote 0
        • S
          Sushma_MP last edited by

          this is to create the slider but i need to implement this slider in music player , requirement is as soon as the song played the slider has to move and maximumValue should be the length of the selected song..

          M 1 Reply Last reply Reply Quote 0
          • M
            mostefa @Sushma_MP last edited by mostefa

            @Sushma_MP said in Slider in QML:

            this is to create the slider but i need to implement this slider in music player , requirement is as soon as the song played the slider has to move and maximumValue should be the length of the selected song..

            What about binding?

            http://doc.qt.io/qt-5/qml-qtqml-binding.html#details

            Slider {
                id: slider
                Binding {
                    target: slider
                    property: "value"
                    value: yourPlayer.value//or something like this
                }
            }
            
            1 Reply Last reply Reply Quote 1
            • S
              Sushma_MP last edited by

              Thank you let me try out this...

              1 Reply Last reply Reply Quote 0
              • First post
                Last post