Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Slider Tickmarks Layout

Slider Tickmarks Layout

Scheduled Pinned Locked Moved 3rd Party Software
2 Posts 2 Posters 2.6k 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.
  • P Offline
    P Offline
    ptbremer
    wrote on last edited by
    #1

    Hello,

    I am trying to put some simple labels under/over a slider with tickmarks. However, I have some problems of accurately aligning labels to the ticks. In particular, the tickmarks are offset from the two endpoints of the slider. Is there a good (ideally platform independent) way to figure out the position of the first/last tickmark within is widget ? In the default Mac OS 10.6 style it seems both are offset by 9 pixels. I have tried to query things like QStyle::PM_SliderThickness and company but I am either querying the wrong style or these do not have the information I need. I am new to Qt so I am wondering whether there is an easy way to figure this out or whether there are inherent reasons why this should/cannot be easily determined in a general way.

    Thanks in advance for any hint

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Good question. I guess this is tricky to do with the standard Qt slider widget. What you might considder (if possible for you), is to use Qwt instead. It provides more options for its slider widget, including having custom scales. It even supports logartitmic scales.

      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