Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSlider stylesheet handle gets slightly cut off on linux but looks fine on windows
Qt 6.12 LTS is out! See what's new in the release blog

QSlider stylesheet handle gets slightly cut off on linux but looks fine on windows

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 965 Views
  • 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.
  • T Offline
    T Offline
    tjudg
    wrote on last edited by
    #1

    alt text

    alt text

    QSlider::groove:horizontal {height:6px; background-color:red;}
    QSlider::handle{margin:-6px; image: url(:/image/handle.png)}
    

    Is there a way to make the slider on linux not slightly cut off the top and bottom of the handle?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tjudg
      wrote on last edited by
      #2

      I figured it out, it wasn't a stylesheet problem. I had to add

      slider->setFixedHeight(20)
      

      and it worked.

      alt text

      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
      • Unsolved