Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt.labs.controls in Qt5.6 beta Slider, stepSize, snapMode

Qt.labs.controls in Qt5.6 beta Slider, stepSize, snapMode

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlbetalabs.controls
5 Posts 3 Posters 1.8k Views
  • 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.
  • M Offline
    M Offline
    Mapau
    wrote on 3 Feb 2016, 08:37 last edited by Mapau 2 Mar 2016, 08:41
    #1

    Hi,

    I am very intrested in using the new qt quick controls and I found some behavior of the slider thats maybe a bug. Can somebody confirm that i use it right and made no mistake there.

    If I set the from an to value on the slider and the stepSize I am not able to drag the silder to the values of the stepSize, but the increase() and decrease() methods work correctly.

    I got the values from 0.0 / 0.4 / 0.8 / 1.2 / 1.6 / 2.0 by draging the handle but the values 0.0 / 0.2 / 0.4 / 0.6 / 0.8 / 1.0 / 1.2 / 1.4 / 1.6 / 1.8 / 2.0 by using the increase() and decrease() methods.

    andd If iset the snapMode to default (Slider.NoSnap) I can set any value by draging the handle ignoring the stepSize.

    the qml

    import QtQuick 2.6
    import Qt.labs.controls 1.0
    
    Button {
    	id: minus
    	text: "-"
    	onClicked: sliderOne.decrease()
    }
    Slider {
    	id: sliderOne
    	from: 0.0
    	to: 2.0
    	stepSize: 0.2
    	snapMode: Slider.SnapOnRelease
    }
    Button {
    	id: plus
    	text: "+"
    	onClicked: sliderOne.increase()
    }
    Label {
    	id: sliderOneValue
    	text: sliderOne.value
    }
    
    1 Reply Last reply
    2
    • J Offline
      J Offline
      jpnurmi
      wrote on 5 Feb 2016, 12:41 last edited by
      #2

      Yes, it looks like a bug. Thank you for bringing this up - I'll take a look.

      1 Reply Last reply
      1
      • J Offline
        J Offline
        jpnurmi
        wrote on 9 Feb 2016, 08:50 last edited by
        #3

        A fix has landed to the 5.6 branch, and will be released in Qt 5.6.1. Meanwhile, as a workaround, use a range of [0.0..1.0] and do the multiplication where the value is used.

        M 1 Reply Last reply 9 Feb 2016, 16:36
        0
        • J jpnurmi
          9 Feb 2016, 08:50

          A fix has landed to the 5.6 branch, and will be released in Qt 5.6.1. Meanwhile, as a workaround, use a range of [0.0..1.0] and do the multiplication where the value is used.

          M Offline
          M Offline
          morte
          wrote on 9 Feb 2016, 16:36 last edited by
          #4

          @jpnurmi Hello, good to see Qt developers on these forums.
          Does 5.6 branch of Qt Quick Controls 2 have any dependencies (in case i use it with Qt 5.6.0 RC/release packages)?

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jpnurmi
            wrote on 9 Feb 2016, 16:52 last edited by
            #5

            We will push only stabilizing bug fixes to the 5.6 branch, so it will stay compatible with the 5.6.0 RC/release packages. All new features are pushed to the dev/5.7 branch. Technically 5.7 is already feature frozen when the branch gets created, but modules previously stamped as tech previews have an exception so we can continue the development full speed. We still got plenty of things to do before we have earned the final stamp. :)

            1 Reply Last reply
            0

            4/5

            9 Feb 2016, 16:36

            • Login

            • Login or register to search.
            4 out of 5
            • First post
              4/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved