Results 1 to 2 of 2

Thread: customize the groove of qslider

  1. #1
    Join Date
    May 2010
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default customize the groove of qslider

    Hi, all!

    I want to design a customized qslider, the groove of which is rendered in two parts. Each part is in a different color. I find the following css code
    Qt Code:
    1. QSlider::add-page:horizontal {
    2. background: white;
    3. }
    4.  
    5. QSlider::sub-page:horizontal {
    6. background: navy;
    7. }
    To copy to clipboard, switch view to plain text mode 
    However, I want the separation position of the groove not decided by the handle, but by some specific value within the range of slider itself, and the seperation position can change in the running program. Please help me.

    Regards,
    Oscar

  2. #2
    Join Date
    Dec 2019
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: customize the groove of qslider

    Quote Originally Posted by oscar_chen View Post
    Hi, all!

    I want to design a customized qslider, the groove of which is rendered in two parts. Each part is in a different color. I find the following css code
    Qt Code:
    1. QSlider::add-page:horizontal {
    2. background: white;
    3. }
    4.  
    5. QSlider::sub-page:horizontal {
    6. background: navy;
    7. }
    To copy to clipboard, switch view to plain text mode 
    However, I want the separation position of the groove not decided by the handle, but by some specific value within the range of slider itself, and the seperation position can change in the running program. Please help me.

    Regards,
    Oscar
    If you create an image for the qslider groove and add it as the groove' background.

Similar Threads

  1. QSlider step customize
    By Kostanev in forum Qt Programming
    Replies: 9
    Last Post: 14th July 2015, 12:47
  2. Customize QFileDialog
    By Swankee in forum Newbie
    Replies: 10
    Last Post: 25th November 2009, 20:21
  3. How to customize the icon?
    By snowdream in forum Qt Programming
    Replies: 2
    Last Post: 12th November 2009, 06:59
  4. Transparent QScrollbar groove in QWebView
    By Jonas in forum Qt Programming
    Replies: 0
    Last Post: 20th October 2008, 08:55
  5. how can i customize a QMainWindow
    By wygggyxtf in forum Qt Programming
    Replies: 15
    Last Post: 23rd June 2007, 06:18

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.