I need to create a custom push button which will have 3 different background images corresponding to the following states:
- normal
- mouse over
- mouse down
I would like to have a QHBoxLayout
with 3 parts for left side, right side and middle side (stretching side) for the button.
Inside the middle size, I would like to have a label to show the text.
I need this button to have a "clicked" event as well.
I have been doing a lot of search to achieve this but I am really lost. I tried many things including custom widget from QWidget
or styling QPushButton
with stylesheets but I failed to achieve having 3 images for 3 mouse states and the clicked event.
I am looking for help.