【发布时间】:2023-04-04 10:13:01
【问题描述】:
有一个qml文件是这样的:
Item {
width: 800
height: 600
Image {
id: background
width: 800
height: 600
source: "qrc:/resorces/background.png"
}
Rectangle {
id: transframe
x: 500
y: 200
width: 200
height: 100
}
}
如何让transframe的区域透明,这样我就可以看到背景下的图形了。
【问题讨论】:
-
如果您可以添加您注意到的屏幕截图,这将是有益的。也许你可以为 transframe 设置 color:"transparent" 属性