Solved Exe file from the project
-
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. -
Hi
Did you try the
win32: RC_ICONS = myIcon.icoin 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 -
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:
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. -
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:
- build an exe file from your project
- give the exe an application icon, as it appears in Windows Explorer (not strictly necessary, but the easiest way to get to three)
- 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:
- either use Qt Creator, or run
qmake
followed bynmake.exe
(since you're using MSVC). - set RC_ICON as @mrjj suggested, or, if you have you're own custom Windows
*.rc
file then setIDI_ICON1
in your*.rc
file. - 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'sDesktop
folder.
Cheers.
-
Since you are on windows take a look at this documentation it will tell you all you need know.