QtQuick 2 Transparent Window Background

后端 未结 3 1716
太阳男子
太阳男子 2021-01-01 06:20

I\'ve been searching how to make the background of my QtQuick 2.0 application transparent. Most answers I\'ve found use Qt

3条回答
  •  不知归路
    2021-01-01 06:52

    Try this

    import QtQuick 2.2
    import QtQuick.Window 2.0
    
    
     Window {
        id: backlight
    
        visible: true
        title: qsTr("backlight")
        width: 500
        height: 50
        x: (Screen.width - width) / 2
        y: (Screen.height - height) / 2
        color: "transparent"
    
    
        }
    

提交回复
热议问题