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. Exe file from the project
Forum Updated to NodeBB v4.3 + New Features

Exe file from the project

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 1.6k Views 4 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.
  • M Offline
    M Offline
    Mimoid
    wrote on last edited by
    #1

    Hi! How can I create exe file from my program project to have an icon which I can run from the desktop?
    I read a tutorial about this but I havent mingw folder where are the necessary files. I have msvc2015_64 folder and there are not these files.

    Paul ColbyP 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      Did you try the
      win32: RC_ICONS = myIcon.ico

      in the pro file ?
      and the myicon.ico should exist in folder with .pro file.

      http://stackoverflow.com/questions/26949713/how-to-set-a-qt-programs-icon-under-windows

      Also
      https://forum.qt.io/topic/74716/set-exe-icon-from-qrc-using-visual-studio

      1 Reply Last reply
      2
      • M Offline
        M Offline
        Mimoid
        wrote on last edited by
        #3

        I dont understand. You want me to write RC_ICONS = myIcon.ico in the pro file? I did it but nothing happen.
        These are my files in project folder:
        alt text
        I want to have that file which i can run on other computers, from desktop e.t.c
        I have been reading this tutorial http://stackoverflow.com/questions/8312725/how-to-create-executable-file-for-a-qt-application but i dont have this mingw folder. And when i run exe file from my build folder i get error "not found qt5widgets.dll".
        Do you know what i mean and what i want to do? Sorry for my english.

        1 Reply Last reply
        0
        • M Mimoid

          Hi! How can I create exe file from my program project to have an icon which I can run from the desktop?
          I read a tutorial about this but I havent mingw folder where are the necessary files. I have msvc2015_64 folder and there are not these files.

          Paul ColbyP Offline
          Paul ColbyP Offline
          Paul Colby
          wrote on last edited by
          #4

          Hi @Mimoid,

          How can I create exe file from my program project to have an icon which I can run from the desktop?

          There's a few ways I can interpret that question, so just to help us understand, there's broadly three things you need to do:

          1. build an exe file from your project
          2. give the exe an application icon, as it appears in Windows Explorer (not strictly necessary, but the easiest way to get to three)
          3. add an icon / shortcut to the user's desktop, that points to the built exe.

          Let us know which of those three are you up to / struggling with, and we can expand on that one. But the short, short versions are something like:

          1. either use Qt Creator, or run qmake followed by nmake.exe (since you're using MSVC).
          2. set RC_ICON as @mrjj suggested, or, if you have you're own custom Windows *.rc file then set IDI_ICON1 in your *.rc file.
          3. lots of options, but ideally, use an installer tool, such as Qt Install Framework or NSIS. Otherwise, you'd need to manually create a *.lnk file in the user's Desktop folder.

          Cheers.

          1 Reply Last reply
          3
          • K Offline
            K Offline
            kenchan
            wrote on last edited by
            #5

            Since you are on windows take a look at this documentation it will tell you all you need know.

            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