Results 1 to 4 of 4

Thread: QSlider tickInterval

  1. #1
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default QSlider tickInterval

    I want to make slider smooth. I dont need any tick.

    What value should I pass in QSlider::setTickInterval();
    Or do I need to work something extra ?

  2. #2
    Join Date
    May 2008
    Posts
    42
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4

    Default Re: QSlider tickInterval

    Hi,

    ui.Slider->setStyleSheet("QSlider::groove:horizontal {border: 1px solid #999999; height: 6px; background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #c4c4c4); margin: 2px 0; border-radius: 4px; } QSlider::handle:horizontal { background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); border: 1px solid #5c5c5c; width: 6px; margin: -4px 0; border-radius: 3px;} ");

    Thanks and regards,
    Santhosh

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSlider tickInterval

    How about using QSlider::setTickPosition , with QSlider::NoTicks.

    Will that work for you ?

  4. #4
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QSlider tickInterval

    @ aamer
    This property only holds the tickmark position for this slider.
    No tick means no tickmark will be drawn..

    Anyways I got it how to do..
    We cannot remove tick interval, we just can make range higher so tick interval will be very low, so then it will look much smoother.

    Consider a slider 100 pixels long. We set range to 1 to 10, so here the tick interval = 100/10
    means 10 pixels will be the interval.


    Consider a slider 100 pixels long. We set range to 1 to 100, so here the tick interval = 100/100
    means 1 pixel will be interval..so it will look 10 times smoother.


    Have fun guys. Thanx for help.
    now you can look into
    http://www.qtcentre.org/forum/f-qt-p...ost-15919.html

Similar Threads

  1. Problems customizing QSlider
    By Antrax in forum Qt Programming
    Replies: 13
    Last Post: 20th December 2011, 07:00
  2. how to number the ticks of QSlider
    By babu198649 in forum Newbie
    Replies: 4
    Last Post: 11th June 2008, 13:46
  3. QSlider problem
    By sincnarf in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2007, 01:07
  4. QSlider Update Problem
    By December in forum Qt Programming
    Replies: 4
    Last Post: 10th September 2006, 04:02
  5. Video and QSlider
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 1st May 2006, 19:37

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.