[Qt-interest] Bug in Qt 4.5.1 QGraphicsItem setOpacity?
Murphy, Sean M.
sean.murphy at gd-ais.com
Wed Apr 29 16:42:31 CEST 2009
I've got problem with setting the opacity on QGraphicsPixmapItem's. I
first noticed it in my real application, and then came up with a test
application that reproduces the problem, which I've included.
When you run the test application, you get a QGraphicsScene with a
checkerboard pattern background. Over the top of the background, I've
put in 4 colored QGraphicsPixmapItem's. I then have a timer that sets
the opacity of the 4 colored items from 0.0 to 1.0 in 0.2 steps, then
decreases the opacity from 1.0 to 0.0 in 0.2 steps, and repeats this
process forever.
On my Mac running Qt 4.5.0 this seems to work perfectly, when the
opacity of the tiles is 1.0 I can't see the checkerboard pattern through
them, and when their opacity is set to 0.0, I can only see the
checkerboard pattern.
On my Windows machine, running the versions of Qt and mingw provided by
qt-sdk-win-commercial-2009.02.exe, at opacity of 1.0 the checkerboard
pattern is hidden (correct), but when the opacity is 0.0, I can still
see evidence of the tile colors superimposed over the checkerboard
pattern.
Can anyone confirm this?
Does anyone know what to do to work around it? On Windows, explicitly
hiding the items when their opacity reaches 0.0 doesn't seem to work
either...
Sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sceneFadeTest.zip
Type: application/x-zip-compressed
Size: 2523 bytes
Desc: sceneFadeTest.zip
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090429/0c0bed33/attachment.bin
More information about the Qt-interest-old
mailing list