Regarding Icons for my Application?



  • 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.



  • 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


  • Moderators

    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.



  • 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



  • @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.


  • Moderators

    [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.


Log in to reply
 

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