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. QGraphicsItem click on alpha transparent area
Forum Updated to NodeBB v4.3 + New Features

QGraphicsItem click on alpha transparent area

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 664 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.
  • S Offline
    S Offline
    sw0ce
    wrote on last edited by
    #1

    Hi,

    I´ve subclassed the QGraphicsItem and implemented the mousePressEvent. I load an image (.png) to the pixmap with transparent areas in it (opacity = 0). Everything is fine with the click event until I click into the transparent area. I want to get the click event also on These areas.
    My solution at the moment is to set the opacity to 0.01 and this works fine. But with a bright background this part is visible (just a little bit but it annoys me :) ).

    Does someone know a better solution without making the transparent sections visible?

    Thanks an regards.

    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