[SOLVED] Setting application icon without qmake --> can't find rc program



  • Hello,
    now, finally, I have finished my first little program and I'd like to add an icon to the application itsself.
    In the documentation (and also in every google search result) there are two possibilities applied:

    1. with qmake (what I'm actually not interessted in because I'd like to know how to do it manually)
    2. without qmake:
      --> creating a .rc file which contains:
      [quote]IDI_ICON1 ICON DISCARDABLE "myappico.ico"[/quote]
      --> then running rc program on it --> output should be an .res file
      --> adding this .res file to compiler command

    My problem:
    I can't find any rc.exe on my computer. I'm using Qt5.3 with mingw_32.
    The only thing I have is a rcc.exe, but I can't run it on the .rc file because it gives me many errors, so I think that is the wrong program fot it.
    Does anyone know what to do in this situation?


  • Lifetime Qt Champion

    Hi,

    You should simply add this to your pro file

    @ RC_FILE = agiscan.rc@

    The rest should be done for you



  • Hi,
    thank you for that fast support!
    Well, this way is for sure the easiest one, but I'd like to do it one time without any tools, just by using the comand line... I did a little program that automatically calls g++/moc with all needed includes and libs, and I can simply run this program by right clicking on the source. For getting used to Qt, I wanted to do it that way without any tools.
    So what I need is a program to call via command line, and this program should make a valid .res file from my .rc file... I simply don't know which program to call.
    Could you help me with that?


  • Lifetime Qt Champion

    Since you are talking about g++, I assume you are using MinGW then you are looking for "this":http://www.mingw.org/wiki/MS_resource_compiler



  • That was exactly the information I was looking for, thank's a lot!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.