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. Help with Icon on Mainwindow using cmake
QtWS25 Last Chance

Help with Icon on Mainwindow using cmake

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 395 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.
  • S Offline
    S Offline
    shathcock
    wrote on last edited by
    #1

    I have written several applications in the past using older versions of QT but have just recently installed QT 6 and of course have change from qmake to cmake. I am trying to get an icon to appear next to the title on the window header. I have searched diligently trying to find information on how to achieve this but just keep hitting brick walls. If someone could point me in the right direction it would be greatly appreciated!!! Thanks

    D Pl45m4P 2 Replies Last reply
    0
    • S shathcock

      I have written several applications in the past using older versions of QT but have just recently installed QT 6 and of course have change from qmake to cmake. I am trying to get an icon to appear next to the title on the window header. I have searched diligently trying to find information on how to achieve this but just keep hitting brick walls. If someone could point me in the right direction it would be greatly appreciated!!! Thanks

      D Offline
      D Offline
      DJaq
      wrote on last edited by
      #2

      @shathcock Hello, have you looked at this: https://doc.qt.io/qt-5/appicon.html
      There is an example for CMake.

      1 Reply Last reply
      2
      • S shathcock

        I have written several applications in the past using older versions of QT but have just recently installed QT 6 and of course have change from qmake to cmake. I am trying to get an icon to appear next to the title on the window header. I have searched diligently trying to find information on how to achieve this but just keep hitting brick walls. If someone could point me in the right direction it would be greatly appreciated!!! Thanks

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by Pl45m4
        #3

        @shathcock

        AFAIK you can still use Qt resource files, include your icon there and add the resource to your cmake.

        • https://doc.qt.io/qt-6/cmake-get-started.html

        • Resource system is explained here

        @DJaq

        This is the App-Icon = "Desktop Icon" = "Icon of your executable". @shathcock was talking about the window icon, I think.


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        S 1 Reply Last reply
        2
        • Pl45m4P Pl45m4

          @shathcock

          AFAIK you can still use Qt resource files, include your icon there and add the resource to your cmake.

          • https://doc.qt.io/qt-6/cmake-get-started.html

          • Resource system is explained here

          @DJaq

          This is the App-Icon = "Desktop Icon" = "Icon of your executable". @shathcock was talking about the window icon, I think.

          S Offline
          S Offline
          shathcock
          wrote on last edited by
          #4

          @Pl45m4 HI thanks for the replies yes I was talking about the window icon to start with but I need to know how to incorporate the icon for a windows installation also.

          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