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. QSlider handle form
Qt 6.11 is out! See what's new in the release blog

QSlider handle form

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 1.6k Views 2 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.
  • J Offline
    J Offline
    JPannetier
    wrote on last edited by
    #1

    Hello ,

    I'm writting you about the handle of QSlider.
    I'm using QT 5
    By default the handle of QSlider is a circle .
    How to change this to a rectangle as old version of QT ?

    Into Style Sheet ?

    Thank you

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mostefa
      wrote on last edited by mostefa
      #2

      Hi @JPannetier

      Yes you can play with stylesheet,

      If you have an image of your shape (rectangle for example),

      You can do something like this:

      QSlider::handle {
      image: url(:/images/rect.png);
      }
      

      Hope this can help !

      1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Out of curiosity, since Qt follows the platform style, is it only for personal taste that you want to get the old style back ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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