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. Adding an icon?
Qt 6.11 is out! See what's new in the release blog

Adding an icon?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.1k Views 2 Watching
  • 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by SPlatten
    #1

    Is there an easy way to embedded and add an icon to an Qt application?

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Define icon. Where will it be displayed?
      What build system? CMake or qmake?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      SPlattenS 1 Reply Last reply
      0
      • VRoninV VRonin

        Define icon. Where will it be displayed?
        What build system? CMake or qmake?

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by SPlatten
        #3

        @VRonin , sorry I should have been more specific...I'm referring to a default desktop icon for the application that is embedded in the executable.

        With IDE's like MSVC this is quite straight forward.

        Kind Regards,
        Sy

        artwawA 1 Reply Last reply
        0
        • SPlattenS SPlatten

          @VRonin , sorry I should have been more specific...I'm referring to a default desktop icon for the application that is embedded in the executable.

          With IDE's like MSVC this is quite straight forward.

          artwawA Offline
          artwawA Offline
          artwaw
          wrote on last edited by artwaw
          #4

          @SPlatten Will this help? https://doc.qt.io/qt-5/appicon.html

          I, for Windows and using qmake, simply add RC_ICONS=path_to_icon_file.ico in the .pro file and it just works.

          EDIT: for embedding icon in .exe please see the link.

          For more information please re-read.

          Kind Regards,
          Artur

          SPlattenS 3 Replies Last reply
          3
          • artwawA artwaw

            @SPlatten Will this help? https://doc.qt.io/qt-5/appicon.html

            I, for Windows and using qmake, simply add RC_ICONS=path_to_icon_file.ico in the .pro file and it just works.

            EDIT: for embedding icon in .exe please see the link.

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #5

            @artwaw , thank you.

            Kind Regards,
            Sy

            1 Reply Last reply
            0
            • artwawA artwaw

              @SPlatten Will this help? https://doc.qt.io/qt-5/appicon.html

              I, for Windows and using qmake, simply add RC_ICONS=path_to_icon_file.ico in the .pro file and it just works.

              EDIT: for embedding icon in .exe please see the link.

              SPlattenS Offline
              SPlattenS Offline
              SPlatten
              wrote on last edited by
              #6

              @artwaw, just added the RC_ICONS to the pro file, it doesn't change colour when entered like the other labels...will try anyway.

              Kind Regards,
              Sy

              1 Reply Last reply
              0
              • artwawA artwaw

                @SPlatten Will this help? https://doc.qt.io/qt-5/appicon.html

                I, for Windows and using qmake, simply add RC_ICONS=path_to_icon_file.ico in the .pro file and it just works.

                EDIT: for embedding icon in .exe please see the link.

                SPlattenS Offline
                SPlattenS Offline
                SPlatten
                wrote on last edited by
                #7

                @artwaw It works :)

                Kind Regards,
                Sy

                1 Reply Last reply
                1

                • Login

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