Results 1 to 5 of 5

Thread: Setting the Application Icon on Windows

  1. #1
    Join Date
    Nov 2009
    Posts
    129
    Thanks
    4
    Thanked 29 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Setting the Application Icon on Windows

    These instructions seem simple enough:
    Setting the Application Icon on Windows
    but I get:

    mingw32-make[1]: *** No rule to make target `..\source\MixAndMatch.rc', needed by `debug/MixAndMatch_res.o'. Stop.

    instead of a build. What am I supposed to know but don’t?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,709
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Setting the Application Icon on Windows

    Can you show your pro file?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Nov 2009
    Posts
    129
    Thanks
    4
    Thanked 29 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Setting the Application Icon on Windows

    Thank you for responding. It turned out to be a silly error on my part: I misspelled the name of the *.rc file in the source folder; since make complained about lacking a “rule” rather than not finding a file, it didn’t occur to me to check that until I went looking for the *.pro file to copy into a reply to you... then I saw it.

    In retrospect, I take it the error message meant that make had instructions (from the RC_FILE directive) for which it required MixAndMatch.rc, which it couldn’t find, and so it concluded that it was supposed to make that file, and it had no instructions telling it how to do that.

  4. #4

    Default Re: Setting the Application Icon on Windows

    Test if you have a space in some folder in your path to the project.
    Example: D:\Lab\QtProjects\MyNotepad 1.0

    This make that cannot recognize "windres"

    Do the follow:
    -Delete the pro.user file in your project root directory
    -rename without spaces (Ex: D:\Lab\QtProjects\MyNotepad-1.0)
    -in Qt Creator -> Open Project -> mynotepad.pro (following the example)
    Compile and Voilé.... All ok!!

    Try...

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,314
    Thanks
    244
    Thanked 678 Times in 668 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Setting the Application Icon on Windows

    This "answer" has absolutely nothing to do with the original question that was asked in this seven year old post. Why did you dig it up and answer a question that was never asked?

    Besides that, the correct "answer" is not to rename files and directories, it is to enclose the path and/or file name in quotes when there are embedded spaces:

    Qt Code:
    1. "D:\Lab\QtProjects\MyNotepad 1.0"
    To copy to clipboard, switch view to plain text mode 
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. setting main application icon on windows
    By JeanC in forum Qt Programming
    Replies: 7
    Last Post: 12th June 2017, 06:35
  2. Setting OS Specified Icon on the File?
    By vishal.chauhan in forum Qt Programming
    Replies: 4
    Last Post: 31st May 2008, 13:37
  3. Setting an icon to an Item in a QlistWidget
    By LordQt in forum Qt Programming
    Replies: 18
    Last Post: 23rd August 2007, 23:24
  4. Setting window icon on derived QWidget
    By steg90 in forum Qt Programming
    Replies: 5
    Last Post: 16th July 2007, 12:21
  5. Setting default icon for all windows / dialogs
    By steg90 in forum Qt Programming
    Replies: 1
    Last Post: 5th July 2007, 11:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.