Hello! How to put an image on a button - I did this:
Button { id: btn width: 250 height: 100 anchors.centerIn: parent text: "A button" style: ButtonStyle { background: Image { fillMode: Image.PreserveAspectFit source: "btn_state.png" } } } I just do not know how to make it so that when you click on the button, the image changes and is restored to the original image again. I tried to forward MouseArea , but then I can't use styles to replace the image. All day long dig through with it, and now I ask for your help.

