pietergdp
pietergdp

Reputation: 15

How to make an applicantion icon for c++ in Netbeans

I am trying to create an application icon for my c++ program using qt in Netbeans. I am able to change the form icon, I want to change the icon on the .exe.

Most of the methods I have found involves editing the .rc and .pro files in the project, but the only .rc and .pro files I can find in my project folder, gets generated automatically and any changes I make gets lost.

Any help would be appreciated.

Upvotes: 0

Views: 715

Answers (2)

SalkinD
SalkinD

Reputation: 783

Just posting my solution cause I needed a long time to figure it out (won't be a perfect or beautiful solution but works.)

1) create a file called "resource.rc": (supposed icon.ico is in same folder)

MAINICON  ICON  "icon.ico"

2) call "windres resources.rc -O coff -o resources.res"

3) put the resources.res into project folder

4) Right click on your c++ project in netbeans -> Properties -> Build -> Linker -> Additional options: add "resources.res"

5) Build.

Upvotes: 2

pietergdp
pietergdp

Reputation: 15

The best solution I could come up with, with the help of hank, was to download the ReplaceVistaIcon.exe and then integrate it as a post-build step.

Upvotes: 0

Related Questions