How to use IMAGE AS BUTTON?
I want to insert an IMAGE, and use that particular IMAGE AS BUTTON.
Using only the code option and not use the DESIGN PART.
eg: The play and pause button which appear as inverted triangle and a square respectively , in a video file etc.
Could I get help with same.
You can use QPushButton, and add the image we have setIcon() method
QPushbutton *button = new QPushbutton;
Add images in the resource file, as it will relative path, dont provide absolute path.
Based on the condition, change the image in Button, for play and pause.
@Pradeep-Kumar Thanks Sir, Now its working,
I was giving absolute path.
Hi @adityatrikha08 ,
Glad u got the solution, happy coding.