I have several *.png icon files like new.png, open.png etc. I added these icons to my main menu in the QtCreator as following:
Now, I can see that icon next to the newAction QAction object in the Qt creator design mode as here
The visible and iconVisibleInMenu is both checked in the properties window!
But, when I build that project and run my application, the icon is not there?? Why or what am I missing?
Ok 1. I have to add a resource file via right click -> add.. -> Qt -> Resource file 2. Click on that new resource file and add folder with the icons.
Now, you are also able to select a resource in your whole code.