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. Setting opacity for a QGraphicsPixmapItem
Qt 6.11 is out! See what's new in the release blog

Setting opacity for a QGraphicsPixmapItem

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

    I'm trying to lay down two QGraphicsPixmapItems on top of each other in a grahicsview(graphicsscene). For the top QGraphicsPixmapItem, I'm trying to set the opacity so that I can see the bottom QGraphicsPixmapItem. Nothing I do works in being able to see the bottom pixmap. pixmap.setOpactiy(0.25) has no effect. I've also tried setting the alpha channel for each pixel too. Any Suggestions?

    The Top QGraphicsPixmapItem is created from a QImage. The QImage is generated by setting each pixel with a rgba color. I've tried tried several values for Alpha but with no effect.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jh224
      wrote on last edited by
      #2

      I figured out the problem. I was not adding the items correctly to the scene.

      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