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. Customize Slider control (Solved)

Customize Slider control (Solved)

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.1k 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.
  • T Offline
    T Offline
    Tân Ngọc Đỗ
    wrote on last edited by
    #1

    Hello all,

    Could you please guide me how to customize slider, for example: changing position of handle by just dragging itself not by clicking in groove(default behavior of slider). I can not using Mouse Area for slider; when I declare mouse area the handle can not be moved.

    Thanks

    1 Reply Last reply
    0
    • O Offline
      O Offline
      onek24
      wrote on last edited by
      #2

      Hello and welcome to devnet,

      by changing the position by just dragging you mean that you can click and hold anywhere where the slider is and drag the handle, so you won't need to click and hold the handle?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tân Ngọc Đỗ
        wrote on last edited by
        #3

        I read the Slider component in this example: http://qt-project.org/doc/qt-4.8/demos-declarative-flickr-qml-flickr-common-slider-qml.html; The position of slider is changed by dragging its handle.

        But with the slider control(http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-slider.html) , when I click on arbitrary point on slider, the position of handle is also changed. I want to customize the slider control like above example; I tried to use mouse area of slider control but It's not sucessful.

        1 Reply Last reply
        0
        • O Offline
          O Offline
          onek24
          wrote on last edited by
          #4

          Well it looks like you can't even modify this function using a SliderStyle. You'll have to create a custom Slider which looks like the Controls Slider, kind of like the one in the example you providet but just with your style.

          1 Reply Last reply
          0

          • Login

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