Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Where is the alpha of a color stored?
jcoc611 last edited by
Setting the color of an Item with a hexadecimal quad such as #99FFFFFF (semi-transparent white) works. However, when I access the color property of the Item, it only gives back the triplet of the color (#FFFFFF), without the alpha value. Additionally, the opacity property of the Item is always one (fully opaque). Is there any way to access the current alpha of an Item?
console.log(color) // "#ffffff
You can access it as follow,
console.log(color.r, color.g, color.b, color.a) //a-alpha