I am looking to create a new QML control using PNG images. I would normally use 1 image for each state (Example hover, clicked, disabled). I have noticed that some developers use 1 image with all states of the control in 1 image.. like this...
I would like to learn how to use images like these, I imagine it's useful for creating different styles by modifying a template of a unique design.
So my question is how to use an image and only show one state at a time?
Here is a sample image to use. I would like to create a simple bullet image in QML that does the following.
- Never clicked show grey,
- Hovered it shows yellow,
- Clicked it shows orange.
Here is the image to use.
What I can't figure out is how to use only part of the image per state.
Thanks.