coloroverlay in QML
-
There are a few ways to do it.
- If you use QQuickControls 2, you can use Button's
icon.colorproperty: https://doc.qt.io/qt-5/qml-qtquick-controls2-abstractbutton.html#icon.color-prop - you can use
Rectanglewith a color and some transparency (opacity or alpha value) and place it over your icon - you can use ColorOverlay
- If you use QQuickControls 2, you can use Button's
-
Something like this should work:
Button { icon.color: pressed? "#aaff0000" : "transparent" }