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/QPainter opacity on mac is inconsistent?
Forum Updated to NodeBB v4.3 + New Features

QGraphicsItem/QPainter opacity on mac is inconsistent?

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

    I'm using Qt 4.8.4. I have subclassed QGraphicsItem and in the paint method:
    @painter->setOpacity(0.30);@

    then I create a QRectF contrast and
    @painter->drawRect(contrast);@

    This works fine on Windows 7: The appearance on the screen, printing, and rendering the scene to a QImage to write to a jpg all produce the same opacity of 0.30. On OSX mountain lion 10.8.2, rendering the scene to a QImage to write a jpg works fine as well - it produces identical results to Windows 7.

    However, on OSX 10.8.2, this same code produces a much lower opacity on the monitor and printer - probably closer to 0.10 opacity. Obviously, I need what is printed and what shows up on the monitor to match the jpg that is produced. Any idea what's going on? Is this a bug in some Mac-specific part of Qt?

    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