Saturday 24 February 2018

TrafficControl: Adding a Program Icon to the Ececutable

A program should not only be functional, it must also look like a functional program. The default icon for executables clearly suggest that the program is more a stub/pet project than a mature software.

Creating an icon is quite simple:

  • Start with creating an image that you want to have as an icon




  • Add the icon file to the Qt project's Resources folder. 
  • Create a .rc file that points to the icon file.


  • Finally, include the rc file  in the pro file.
  • Run QMake and compile the program. The executable will now have a window icon.


Note that unless you include/provide the Qt libraries into that executable, the program won't run outside of the Qt environment. I've written about dynamic linking in another blog post.



No comments:

Post a Comment