Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.6.3
-
None
-
Windows 7, 32bit, Linux
Description
Use the simple code below to create a new application. The application crashes when starting. The reason is that the child widgets have graphics effect, and the paint device will fail to be created when the second graphics effect acquiring the context. So a null painterdevice is used and the application crashes.
Note that this happens only when set opacity of QGraphicsOpacityEffect to 1.0. When effect is full opacity, QGraphicsOpacityEffect uses a different code path than translucent.
#include <QtGui> int main(int argc, char **argv) { QApplication app(argc, argv); QWidget* w1 = new QWidget(); QWidget* w2 = new QWidget( w1 ); QGraphicsOpacityEffect* e1 = new QGraphicsOpacityEffect(); QGraphicsDropShadowEffect* e2 = new QGraphicsDropShadowEffect(); e1->setOpacity( 1.0 ); // 0.9 works w1->setGraphicsEffect( e1 ); w2->setGraphicsEffect( e2 ); w1->show(); return app.exec(); }
Attachments
Issue Links
- relates to
-
QTBUG-60231 Crash when QGraphicsOpacityEffect has 1.0 opacity and child widget has graphics effect
- Closed