Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.0.0
-
None
-
Windows
-
a79e42b8f40317f7275b26637e6735754b21727f(Windows, using blurbehind-DWM effects to work around)
Description
If the top level item in the QML file is translucent it should be a translucent window. With QtQuick 2.0 and SG it's always white.
In QtQuick 1.1 :
#include <QtGui> #include <QtDeclarative> int main(int argc, char** argv) { QApplication app(argc, argv); QDeclarativeView * view = new QDeclarativeView; view->setAttribute(Qt::WA_TranslucentBackground, true); view->viewport()->setAutoFillBackground(false); view->setSource(QUrl::fromLocalFile("test.qml")); view->show(); return app.exec(); }
was working fine.
On QtQuick 2.0 this snippet doesn't work :
#include <QtGui> #include <QtDeclarative> int main(int argc, char** argv) { QApplication app(argc, argv); QSGView * view = new QSGView; view->setAutoFillBackground(false); view->setAttribute(Qt::WA_TranslucentBackground, true); view->setSource(QUrl::fromLocalFile("test.qml")); view->show(); return app.exec(); }
It seems there is no viewport() concept in SGView so I set directly on the widget itself.
This bug is very annoying it makes impossible to implement nice popup in QML or translucent overlays.
Attached the qml file used in the snippets.
Attachments
Issue Links
- relates to
-
QTBUG-28214 Cannot make transparent (translucent) background for QQuickView
- Closed