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. How Do I Mask Image Used for QSlider Handle?
Forum Updated to NodeBB v4.3 + New Features

How Do I Mask Image Used for QSlider Handle?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 6.8k Views 1 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.
  • L Offline
    L Offline
    LuckDG
    wrote on last edited by
    #1

    I am using a CSS to set images used for a QSlider groove and handle. That works great. What I need to do is be able to set a mask on the image used for the handle of the QSlider. How do I do that? The normal ::setMask() call on the QSlider sets the mask for the groove's image. I can't seem to figure out how to mask the handle's image. Thanks in advance.

    CSS code for setting QSlider images:

    @
    QSlider#VideoPositionSlider::groove:horizontal {
    image: url(:/images/Graphics-English/VideoPositionSliderGroove.PNG);
    }

    QSlider#VideoPositionSlider::handle:horizontal {
    image: url(:/images/Graphics-English/VideoPositionSliderHandle.PNG);
    }
    @

    [EDIT: @-Tags for code formatting added, Volker]

    1 Reply Last reply
    1
    • D Offline
      D Offline
      dguimard
      wrote on last edited by
      #2

      from my mind, does the handle help?
      @(" QSlider:vertical { width: 50px; }
      QSlider::groove:horizontal { border: 1px solid black; border-radius: 3px; width: 6px; }
      QSlider::handle:horizontal { height: 25px; margin: 0 -22px; image: url(':/images/Graphics-English/VideoPositionSliderHandle.PNG'); }
      ");

      @

      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