23

Is there a way in QML to create a Rectangle with opacity: 0 that still have visible borders? If not, any suggestions on how to work around it?

Thanks

4

1 回答 1

47

不,不透明度适用于项目的完整视觉方面(并且 opacity:0 使项目完全不可见)。如果您想要有边框且没有背景的矩形,请使用“透明”作为颜色。

Rectangle { border.color: "black"; color: "transparent" }
于 2013-09-28T16:38:44.983 回答