Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set property of .exe file in qt?

Tags:

windows

exe

qt

Is there a way to set the property of the app.exe? I'm working on the Windows and I mean when you right click on the .exe file and you choose property and details there you can set description, version, name etc. Does anyone know the way to set it in the code?

like image 406
user932 Avatar asked Mar 19 '23 09:03

user932


1 Answers

You will need to add something like:

win32:RC_FILE = application.rc

to your .pro file. The application.rc text file may contain the following information, including the icon:

IDI_ICON1 ICON DISCARDABLE "resources/Email.ico"

# if defined(UNDER_CE)
#  include <winbase.h>
# else
#  include <winver.h>
# endif

VS_VERSION_INFO VERSIONINFO
    FILEVERSION 0,4,0,0
    PRODUCTVERSION 0,4,0,0
    FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
    FILEFLAGS VS_FF_DEBUG
#else
    FILEFLAGS 0x0L
#endif
    FILEOS VOS__WINDOWS32
    FILETYPE VFT_DLL
    FILESUBTYPE 0x0L
    BEGIN
        BLOCK "StringFileInfo"
        BEGIN
            BLOCK "040904B0"
            BEGIN
                VALUE "CompanyName", "My company\0"
                VALUE "FileDescription", "My application\0"
                VALUE "FileVersion", "0.4.0.0\0"
                VALUE "LegalCopyright", "Copyright (C) 2010-2014 John Daw ([email protected])\0"
                VALUE "OriginalFilename", "application.exe\0"
                VALUE "ProductName", "My Application 0.4\0"
            END
        END
        BLOCK "VarFileInfo"
        BEGIN
            VALUE "Translation", 0x409, 1200
        END
    END
/* End of Version info */
like image 53
vahancho Avatar answered Apr 08 '23 06:04

vahancho