Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSlider set tick interval customized
Forum Updated to NodeBB v4.3 + New Features

QSlider set tick interval customized

Scheduled Pinned Locked Moved Unsolved General and Desktop
qsliderintervaltick
4 Posts 2 Posters 2.6k Views 1 Watching
  • 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
    marlenet15
    wrote on 1 Jul 2016, 20:34 last edited by
    #1

    I have created a QSlider but I can't figure out how to change the tick interval to have two intervals in one QSlider. I would like the QSlider to be divided into three ticks but the range from 0 to the first tick is 50% out of the maximum value of the QSlider, from the first tick to the send tick would be 10%, and from the last tick to the end would be 40%. However, you can only do the tick interval evenly. Is there any way to customize it?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 Jul 2016, 22:54 last edited by
      #2

      Hi,

      The most simple would probably be to subclass QAbstractSlider to customize the slider to your needs.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply 5 Jul 2016, 18:57
      0
      • S SGaist
        1 Jul 2016, 22:54

        Hi,

        The most simple would probably be to subclass QAbstractSlider to customize the slider to your needs.

        Hope it helps

        M Offline
        M Offline
        marlenet15
        wrote on 5 Jul 2016, 18:57 last edited by
        #3

        @SGaist I couldn't find anything about setting different intervals for the ticks.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 5 Jul 2016, 21:13 last edited by
          #4

          Because that's something you have to implemented and handle yourself.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          1/4

          1 Jul 2016, 20:34

          • Login

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