2017-07-18 4 views
0

私は透明なqmlウィンドウを作成し、すべて私のウィンドウズ7テーマをクラシックに変更するまでうまくいきます。透明にしたい領域です。 qt Windows 7クラシックテーマのクイックトランスペアレントウィンドウ

#include <QGuiApplication> 
#include <QQmlApplicationEngine> 
#include <QtQuick> 

int main(int argc, char *argv[]) 
{ 
    QGuiApplication app(argc, argv); 
// QQuickWindow::setDefaultAlphaBuffer(true); 
    QQmlApplicationEngine engine; 
    engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); 
    if (engine.rootObjects().isEmpty()) 
     return -1; 

    return app.exec(); 
} 

と私のQMLは

import QtQuick 2.6 
import QtQuick.Window 2.2 
import QtGraphicalEffects 1.0 

Window { 
    id: window 
    visible: true 
    width: 640 
    height: 480 
    color: "#00000000" 
    flags: Qt.Window | Qt.FramelessWindowHint//去掉标题栏 

    RectangularGlow { 
     anchors.fill: background 
     glowRadius: 10 
     spread: 0 
     cornerRadius: 10 
     color: "#99999999" 
    } 

    Rectangle{ 
     id: background 
     anchors.topMargin: 50 
     anchors.centerIn: parent 
     radius: 15 
     width: parent.width *2/3 
     height: parent.height - 10 
     color: "#ffdbeef5" 
    } 

} 

誰でもいくつかのアイデアを持って読み込みますか?

Here is a screenshot

答えて