Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. exe icon is not full size

exe icon is not full size

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alecs26
    wrote on last edited by
    #1

    Hello,

    I want to set an icon for my program (exe file and desktop shortcut). I am using Qt 5.7 on Windows.
    I followed the instructions from: http://doc.qt.io/qt-5/appicon.html, that is in the pro file I put "RC_ICONS = logo7.ico".

    When I install the program on my computer (Win8), it works well. The desktop shortcut's icon shows my logo perfectly and full size. However, when I install the program on another computer (Win10), the desktop shortcut's icon is not full size. Even if I CTRL-scroll on the desktop to change the icon size, this icon remains the same size.

    Here is an example of two desktop icons (one full and the other one that does not scale).
    alt text

    Is there something special I should do with my icon (I tried icon sizes of 128x128 to 512x512) so that its full screen ?
    Or is it something to do in Qt ?

    Thank you so much !

    Alex

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alecs26
      wrote on last edited by alecs26
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • A Offline
        A Offline
        alecs26
        wrote on last edited by
        #3

        I managed to find a part of the problem.
        The first problem is not Qt related: I had to add layers of different sizes in my .ico
        https://stackoverflow.com/questions/4354617/how-to-make-get-a-multi-size-ico-file

        However, a Qt problem arises.
        At first, to insert my logo in the .exe file, I did:

        add existing file logo1.ico in my project tree
        In the pro file, I added RC_ICONS = logo1.ico
        I tried to replace this logo by a totally different one (logo2.ico).

        I deleted logo1.ico
        add existing file logo2.ico in my project tree
        In the pro file, I replaced this line with RC_ICONS = logo2.ico
        The problem is that when I compile, its always the old logo that I see on the .exe (logo1).
        I deleted the .exe before compiling, I deleted the .prouser and started from scratch but it always the old logo1 that reappears on the .exe....
        --> if I copy paste the .exe, the copied file has the good icon. But if I rename the file to the original .exe, the old logo comes back. If I create a shortcut on the desktop, it has the old logo....

        I have no idea how this can be.....

        I have been able to reproduce this problem with a new Qt project. I started a new project and set-up an icon. It worked. I tried to change it to another one and its always the old one that comes back. I tried deleting the build folder and the .prouser but nothing is working !

        Thanks !

        hskoglundH 1 Reply Last reply
        0
        • A alecs26

          I managed to find a part of the problem.
          The first problem is not Qt related: I had to add layers of different sizes in my .ico
          https://stackoverflow.com/questions/4354617/how-to-make-get-a-multi-size-ico-file

          However, a Qt problem arises.
          At first, to insert my logo in the .exe file, I did:

          add existing file logo1.ico in my project tree
          In the pro file, I added RC_ICONS = logo1.ico
          I tried to replace this logo by a totally different one (logo2.ico).

          I deleted logo1.ico
          add existing file logo2.ico in my project tree
          In the pro file, I replaced this line with RC_ICONS = logo2.ico
          The problem is that when I compile, its always the old logo that I see on the .exe (logo1).
          I deleted the .exe before compiling, I deleted the .prouser and started from scratch but it always the old logo1 that reappears on the .exe....
          --> if I copy paste the .exe, the copied file has the good icon. But if I rename the file to the original .exe, the old logo comes back. If I create a shortcut on the desktop, it has the old logo....

          I have no idea how this can be.....

          I have been able to reproduce this problem with a new Qt project. I started a new project and set-up an icon. It worked. I tried to change it to another one and its always the old one that comes back. I tried deleting the build folder and the .prouser but nothing is working !

          Thanks !

          hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #4

          Hi, I also had this problem with "ghost" icons that would never go away on the Windows desktop, it occurs because Windows likes to cache the icons (to be able to show all the desktop icons faster I guess). The trick is to clear the cache, for more see here

          1 Reply Last reply
          2
          • A Offline
            A Offline
            alecs26
            wrote on last edited by
            #5

            @hskoglund thank you so much, I thought I was crazy !
            Quick question though: let's say I sell my program to customers and that later I want to change my program icon. I would send them an updated version of my program but it's possible that it does not update on their computer because of the cache problem ? I don't think I could ask them to clear their cache and everything....

            hskoglundH 1 Reply Last reply
            0
            • A alecs26

              @hskoglund thank you so much, I thought I was crazy !
              Quick question though: let's say I sell my program to customers and that later I want to change my program icon. I would send them an updated version of my program but it's possible that it does not update on their computer because of the cache problem ? I don't think I could ask them to clear their cache and everything....

              hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #6

              @alecs26 about that question: if you have some kind of installation program, that might help clearing the cache.
              Otherwise, I think one solution is to append the version number in the filename, e.g. first version: MyProgramv1.exe. then: MyProgramv2.exe etc. Because the filenames are different, the old icon will not be used (the new one will show). Of course you'll then have the problem of deleting old/obsolete versions, another fine can of worms :-)

              1 Reply Last reply
              2

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved