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. Taskbar icon different from the icon of the window
QtWS25 Last Chance

Taskbar icon different from the icon of the window

Scheduled Pinned Locked Moved General and Desktop
17 Posts 2 Posters 12.8k 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.
  • R Offline
    R Offline
    ReDKiiL
    wrote on last edited by
    #7

    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?

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #8

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

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ReDKiiL
        wrote on last edited by
        #9

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

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #10

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

          1 Reply Last reply
          0
          • R Offline
            R Offline
            ReDKiiL
            wrote on last edited by
            #11

            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?

            1 Reply Last reply
            0
            • Chris KawaC Offline
              Chris KawaC Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on last edited by
              #12

              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.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                ReDKiiL
                wrote on last edited by
                #13

                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?

                1 Reply Last reply
                0
                • Chris KawaC Offline
                  Chris KawaC Offline
                  Chris Kawa
                  Lifetime Qt Champion
                  wrote on last edited by
                  #14

                  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.

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    ReDKiiL
                    wrote on last edited by
                    #15

                    How can I create an icon with multiple picture inside?
                    I tried using Ico FX and GIMP. and I couldn't.

                    1 Reply Last reply
                    0
                    • Chris KawaC Offline
                      Chris KawaC Offline
                      Chris Kawa
                      Lifetime Qt Champion
                      wrote on last edited by
                      #16

                      Come on... do some work.
                      http://youtu.be/4sAxiGek6VY
                      http://youtu.be/bc_oWkBR7ow

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        ReDKiiL
                        wrote on last edited by
                        #17

                        Finally, I get it! Thank you for your patience.

                        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