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. What is the best way to overlay a color mask on a QGraphicsPixmapItem?
Forum Updated to NodeBB v4.3 + New Features

What is the best way to overlay a color mask on a QGraphicsPixmapItem?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 914 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.
  • P Offline
    P Offline
    Pippin
    wrote on last edited by
    #1

    Hey,

    I have several QGraphicsPixmapItems and sometimes, some of them would need to become gray (for example). How can I do that without reloading each QPixmap? Reloading each QPixmap would be a very costly operation if you have many to handle, so I'd rather avoid this solution.

    Thanks!

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      That's a bit off-topic but how about loading two pixmaps but make one invisible until needed. That should be very fast.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Pippin
        wrote on last edited by
        #3

        @Wieland Although this is one solution, I would have to create beforehand a gray QPixmap for every QPixmap I plan to have. That would be very costly. Plus, I intent the mask to be oscillating between dark gray and light gray, so I would have to do that for every nuance of gray, for every QPixmap.

        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