Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
GrahamL last edited by
I want to set the window opacity of some widgets so I started with
which had no effect
then I tried
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 visible
which has the desired effect.
My question is why did my first option not work?
Since button is not a window. See "windowOpacity":http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#windowOpacity-prop