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. Position of QSlider in a widget
Forum Updated to NodeBB v4.3 + New Features

Position of QSlider in a widget

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.8k 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.
  • G Offline
    G Offline
    go4sri
    wrote on last edited by
    #1

    I am trying to draw a line between two sliders in Qt. When I move either of the sliders, I want the line to move such that it always joins the two sliders.
    !http://i.stack.imgur.com/ZYaVB.png(Slider image)!
    (I have drawn the line for illustration - not programatically)
    How do I do that? The problem is with identifying the position of the sliders. How do I get their locations? either within the widget or within the screen? Once I get their positions, I will be able to draw the line.

    Any ideas? Let me know if you want me to post the code, but basically, all I have is two QSliders - one on top and one at the bottom.

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

      [[doc:QStyle]] allows you to query the position of sub-controls. Perhaps it will allow you to query the rect for the handle of a slider.

      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