Results 1 to 3 of 3

Thread: A progress bar that has a slider on top of it

  1. #1
    Join Date
    Jun 2010
    Posts
    2
    Qt products
    Qt4

    Default A progress bar that has a slider on top of it

    Hello everyone! I'm a little bit new at QT and have been playing around with it a bit as my work is using it for GUI elements. My latest widget I've been tasked to build has me running in circles and I'm kinda confused. Essentially what I need is a progress bar with a dragable slider on top of it (along with some tickmark elements and the like, but those I'm confident I can figure out). I've been looking all over this forum and the web to try to find any way of doing it, and though I found one post here with a few answers, it wasn't really effective for what I need to do. Using Phonon's seekslider doesn't seem viable outside of its media context.

    The other thing I've seen mentioned is using a style sheet, but these are entirely new to me and I was hoping at the very least somebody could point me in a good direction for some reading that would get me going towards my goal here. I've read the documentation pages, and there is so much there that I have no clue how to start.

    Thanks in advance for any help anyone can offer!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: A progress bar that has a slider on top of it

    What exactly do you mean by "over"? You mean you want those widgets stacked on top of each other or one should be above ("more to the north") the other?

    If the latter then simply place two widgets in a vertical layout and you're done. If the former, then subclass QProgressBar, in its constructor create a slider with the progress bar as its parent and reimplement resizeEvent() of the bar where you will adjust the geometry of the slider to the geometry of the progress bar.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2010
    Posts
    2
    Qt products
    Qt4

    Default Re: A progress bar that has a slider on top of it

    Sorry, I should have been smart and attached this initially. I'm looking to essentially have a progress bar that includes a slider, with the progress bar value and the current slider location independent of each other.

    Thank you for the idea though. I'll look into the subclass idea and see what I can make happen.
    Attached Images Attached Images

Similar Threads

  1. Howto combine a slider and a progress bar?
    By Cruz in forum Qt Programming
    Replies: 3
    Last Post: 21st March 2010, 12:09
  2. Replies: 2
    Last Post: 21st March 2010, 09:01
  3. vertical slider
    By TomASS in forum Newbie
    Replies: 4
    Last Post: 29th November 2009, 00:30
  4. Replies: 4
    Last Post: 11th March 2008, 11:44
  5. get slider value
    By eric in forum Qt Programming
    Replies: 1
    Last Post: 8th November 2007, 19:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.