[Interest] <Qt Quick2> transparent bug for frameless window?

nus1998 nus1998 at yeah.net
Thu Nov 21 06:13:55 CET 2013


 Hi All,

I create a transparent viewer using QQuickView, if I don't set the flag "Qt::FramelessWindowHint", everything goes fine, when I set it, there is only a icon on taskbar and no viewer is visible, and I can't active it too.

env: Qt5.2 beta mingw version (5.1 doesn't work too), Win 7 64-bit

The code is attached:
#include<QDebug>
#include<QApplication>
#include<QQuickView>
intmain(intargc,char*argv[])
{
QApplicationapp(argc,argv);
QQuickViewviewer;
QStringdirPath("../test");


viewer.setSource(QUrl::fromLocalFile(dirPath+"/qml/main.qml"));
viewer.connect((QObject*)viewer.engine(),SIGNAL(quit()),SLOT(close()));


//viewer.setColor(Qt::transparent);//uncomment this, the viewer is invisible
viewer.setFlags(Qt::Window|Qt::FramelessWindowHint|Qt::WindowSystemMenuHint|Qt::WindowMinimizeButtonHint);
viewer.setResizeMode(QQuickView::SizeViewToRootObject);
viewer.show();

returnapp.exec();
}
B.R.
Jie




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131121/a32e41a1/attachment.html>


More information about the Interest mailing list