Results 1 to 3 of 3

Thread: Dynamically change slider max range

  1. #1
    Join Date
    Aug 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Dynamically change slider max range

    sliders.jpg

    I have two slider, A and B.

    Would there be an easy way to set the max range for the slider B to be that of the current positions of slider A.

    In other words, slider B should stop to where Slider A knob is at the moment.
    Say that both slider have values from 0 to 10. In the image, slider A is at 7 and B at 0. What I want is that slider B knob stops at the position 7 (where slider A is currently).

    I thought it would be as easy as to setMaximum on valueChanged, but that only affects on the actual values, not the width of the slider nor the max range of it.

    Thanks

  2. #2
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Dynamically change slider max range

    See this example:- qtSliderProject1.zip
    Last edited by sonulohani; 3rd October 2012 at 12:46.
    Heavy Metal Rules. For those about to rock, we salute you.
    HIT THANKS IF I HELPED.

  3. #3
    Join Date
    Aug 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Dynamically change slider max range

    Quote Originally Posted by sonulohani View Post
    See this example:- qtSliderProject1.zip
    Great!

    Just what I was looking for..

    Rock.

Similar Threads

  1. How to change the scroll area range in QTableView?
    By josentop in forum Qt Programming
    Replies: 1
    Last Post: 29th April 2012, 14:13
  2. Replies: 3
    Last Post: 10th October 2011, 08:44
  3. Replies: 0
    Last Post: 6th May 2010, 12:13
  4. Dynamically change the layout
    By pippo42 in forum Qt Programming
    Replies: 2
    Last Post: 12th November 2009, 13:01
  5. line edit value change with slider
    By jjbabu in forum Qt Tools
    Replies: 1
    Last Post: 22nd September 2007, 07:02

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.