How to set .exe file property in qt?

Is there a way to set the app.exe property? I work on Windows, and I mean, when you right-click on the .exe file, and you select the property and details there, you can set the description, version, name, etc. Does anyone know how to install it in code?

+4
source share
1 answer

You need to add something like:

win32:RC_FILE = application.rc

into your .pro file. The text file application.rc may contain the following information, including an 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@mail.com)\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 */
+7
source

All Articles