Re using graphics effects
I have applied a graphics effect to a widget –
QGraphicsOpacityEffect* opacityEffect = new QGraphicsOpacityEffect(this); // make sure to create using new, since effect has to be alive as long as the target widget is using it.
opacityEffect->setOpacity(0.0); // initially widget should be invisible
Now I want the same effect on another widget so I did this –
This has the effect of making the second widget transparent but makes the first visible.
Why am I unable to share the graphics effect object?
You can't you need to create a new QGraphicsOpacityEffect object.
Refer docs for more "setGraphicsEffect":http://qt-project.org/doc/qt-4.8/qgraphicsitem.html#setGraphicsEffect