Rectangle in QML that is transparent, except for the borders

qml
25,662

No, opacity is applied for complete visual aspect of item (and opacity:0 makes item full invisible). If you want rectangle with borders and without background, use "transparent" as color.

Rectangle { border.color: "black"; color: "transparent" }
Share:
25,662

Related videos on Youtube

Troels Folke
Author by

Troels Folke

Updated on August 01, 2022

Comments

  • Troels Folke
    Troels Folke almost 2 years

    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