Taskbar icon different from the icon of the window
-
Well it's a bit of a trickery but if you create an .ico file with different sizes then you might get what you want. The window will use the small one (16px or 24px, I don't remember) while the task bar would use larger ones. To make it an application icon you put it in a resource file "as usually":http://qt-project.org/doc/qt-5/appicon.html.
-
I don't think it will be possible to do this.
Could you tell me if you like at least remove the icon of the window? -
[quote author="ReDKiiL" date="1409265345"]I don't think it will be possible to do this.[/quote]
I actually tried this and it works.
I created an icon with different images for various sizes (I know, I'm not da Vinci):!http://i296.photobucket.com/albums/mm188/crossblades666/icon.jpg(Icon)!And then set that as an app icon. As I said the app window uses the small one (16px) while tha task bar takes a larger one (32px):!http://i296.photobucket.com/albums/mm188/crossblades666/app.jpg(Application icon)!
[quote author="ReDKiiL" date="1409265345"]Could you tell me if you like at least remove the icon of the window?[/quote]In Windows whether it has an icon or not depends on the window type and used windows flags. You can try to play around with window flags, eg.
@ setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint); @ but you might loose some other features in the process. Check other flags and see what you can come up with. For example tool windows(Qt::Tool flag) don't have an icon by default (but they can't be top level windows).
Another option is using the same trick as before: creating a fully transparent image for the 16px version. Of course this would also be invisible in the Explorer when someone switches to list view or other small icon mode. -
[quote author="Chris Kawa" date="1409295819"]!http://i296.photobucket.com/albums/mm188/crossblades666/app.jpg(Application icon)!
[/quote]Good! How did you do?
What program you use to create the icons? -
I did it "like I already described":http://qt-project.org/doc/qt-5/appicon.html
I used built-in Visual Studio editor but it's not very sophisticated. Basically any graphics program that supports .ico format will do. Some that I know or used in the past are IcoFX (free up to 1.6.4), Gimp, Paint.NET (with ico plugin), Inkscape(vector graphics) or even Photoshop (with a plugin). -
I have to add the files into .ico extension? or. bmp?
I have to use the .rc file or add directly into the pro file? -
That wiki page says it all but let me recap.
If you don't already use a .rc file (which you most probably don't) then all you need to do is add in the .pro file
@
RC_ICONS = whatever.ico
@.bmp format does not support multiple images in one file. .ico does. Use .ico.
-
How do I add more icons in just one line? in the pro file?
I'm trying to searching, there are times when I'm trying to make this work.
You could make your source code so I can see? -
You don't add multiple files. It's a single file.
.ico format supports multiple resolutions and bit depths inside a single file.
It has nothing to do with code(or Qt) and there's nothing more to show than the above line in the .pro file. -
How can I create an icon with multiple picture inside?
I tried using Ico FX and GIMP. and I couldn't. -
Come on... do some work.
http://youtu.be/4sAxiGek6VY
http://youtu.be/bc_oWkBR7ow -
Finally, I get it! Thank you for your patience.
15/17