Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Range Slider unable to set StepSize property

    QML and Qt Quick
    2
    2
    269
    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.
    • gfxx
      gfxx last edited by gfxx

      on my ui.qml file I insert a rengeSlider and in designer I set StepSize to 1,00 (but 10,00 is the same) to try to have rangeslider.first.value and rangeslider.second.value as integer only value (so 1,00 - 2,00 - 3,00 - 4,00 and so on).
      But the value returned is only double with decimal part (0,789185 - 1,981625 - 2,65816 and so on).

      Where are my error?

      Update ... after these code in myFunction:

                  property int  integerValue: 0
                  property double doubleValue: 0
                  property int  integerValueSlid1: 0
                  property double doubleValueSlid1: 0
                  property int  integerValueSlid2: 0
                  property double doubleValueSlid2: 0
      
      
                  function changeRangeValue(){
                      doubleValueSlid1 = 0
                      integerValueSlid1 = 0
                      doubleValueSlid2 = 0
                      integerValueSlid2 = 0
                      doubleValueSlid1 = rangeSliderNum.first.value
                      integerValueSlid1 = doubleValueSlid1
                      doubleValueSlid2 = rangeSliderNum.second.value
                      integerValueSlid2 = doubleValueSlid2
                      //console.log((integerValueSlid1))
                      teTempoMinSlider.text = integerValueSlid1
                      teTempoMaxSlider.text = integerValueSlid2 - integerValueSlid1
      

      the range slider work ok!!
      I write this just because it is added to the search for the forum ... can serve someone.

      regards

      bkt

      ODБOï 1 Reply Last reply Reply Quote 0
      • ODБOï
        ODБOï @gfxx last edited by

        @gfxx
        see also parseInt(), parseFloat()

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