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. Regarding Icons for my Application?
Forum Update on Monday, May 27th 2025

Regarding Icons for my Application?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.2k 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.
  • CAD_codingC Offline
    CAD_codingC Offline
    CAD_coding
    wrote on last edited by
    #1

    Hi,
    I have created a Master copy of the icon of my application with a large size. Now I want to resize it to various sizes as per requirement. However I do not know what size to resize to?
    In general, what should be the size of the icon for title bar of Window?
    I cannot think of any other place where the icon can be used.
    This is my first application, so any help in this regard would be very helpful to me.
    Thank You.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      IYAM no need to resize the icon. Qt will do it for you. Just add the icon to a resource file and have fun!
      Greetz

      Greetz, Jeroen

      1 Reply Last reply
      0
      • raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        do you plan to use a icon (e.g. ICO file) or simple image (e.g. PNG file, ...).
        In the first case just create the icon file and add all sizes you want and Qt will choose the appropriate size.
        In the second case resizing to 16x16px or maybe 20x20px should be satisfying for the most cases.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0
        • JeroentjehomeJ Offline
          JeroentjehomeJ Offline
          Jeroentjehome
          wrote on last edited by
          #4

          Oke, it's your first program, so bit more help:
          "A bit about program icons in explorer":http://qt-project.org/doc/qt-4.8/appicon.html
          and you could use the
          @ void setWindowIcon ( const QIcon & icon )@
          function. Before this you can allocate a QIcon with the needed picture (preferred is png file btw). So the code might look this:
          @
          setWindowIcon(QIcon("myPicture.png"));
          @
          There are plenty of tutorials on the needed subjects, so enjoy!
          Greetz

          Greetz, Jeroen

          1 Reply Last reply
          0
          • CAD_codingC Offline
            CAD_codingC Offline
            CAD_coding
            wrote on last edited by
            #5

            @Jeroentje, I have created the icon as a image file i.e. jpg file. When I put it in a resource file & directly used it as a window icon then it was of very bad quality. It was blurred & looked very bad. So I thought maybe there should be some standard way. Thanks for the link.

            @raven I dont know what an ICO file is. But as I said earlier I am using a .jpg file. I will try to resize it to 20x20 px then let you know.

            1 Reply Last reply
            0
            • raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #6

              [quote author="CAD_coding" date="1367836410"]@Jeroentje, I have created the icon as a image file i.e. jpg file. When I put it in a resource file & directly used it as a window icon then it was of very bad quality. It was blurred & looked very bad. So I thought maybe there should be some standard way. Thanks for the link.

              @raven I dont know what an ICO file is. But as I said earlier I am using a .jpg file. I will try to resize it to 20x20 px then let you know.
              [/quote]

              i can't see where you mentioned that you are using a jpg file... Nevertheless if you scaling to that small you should use PNG instead of a JPG. This will give you a better result and will be less blurry as you said.

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0

              • Login

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