QCoreApplication :: applicationVersion does not "recognize" RC_FILE when using Mingw

1

I've created a rc ( Resource File >) and added it to the project ( winvertest.pro ):

  • rcexample.rc

    #include "winver.h"
    
    VS_VERSION_INFO VERSIONINFO
        FILEVERSION 1,0,0,1
        PRODUCTVERSION 1,0,0,1
        FILEFLAGS 0x0L
        FILEFLAGSMASK 0x3fL
        FILEOS 0x00040004L
        FILETYPE 0x1L
        FILESUBTYPE 0x0L
    BEGIN
        BLOCK "StringFileInfo"
        BEGIN
            BLOCK "000004b0"
            BEGIN
                VALUE "CompanyName", "Foo Bar CompanyName"
                VALUE "FileDescription", "Foo bar FileDescription"
                VALUE "FileVersion", "1.0.0.1"
                VALUE "LegalCopyright", "Foo bar LegalCopyright"
                VALUE "InternalName", "foobar"
                VALUE "OriginalFilename", "foobar.exe"
                VALUE "ProductName", "foobar product name"
                VALUE "ProductVersion", "1.0.0.1"
            END
        END
        BLOCK "VarFileInfo"
        BEGIN
            VALUE "Translation", 0x0, 1200
        END
    END
    
  • winvertest.pro

    QT += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = winvertest
    TEMPLATE = app
    
    win32:RC_FILE = rcexample.rc # my rc file
    
    DEFINES += QT_DEPRECATED_WARNINGS
    
    SOURCES += main.cpp
    
  • main.cpp

    #include <QDebug>
    #include <QApplication>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
    
        qDebug() << "applicationVersion:" << a.applicationVersion();
    
        return a.exec();
    }
    

Using MSVC2015 32bit , applicationVersion returns:

  

applicationVersion: "1.0.0.1"

But when I use Mingw 5.3.0 returns empty:

  

applicationVersion: ""

Would this be a problem with Mingw, with Qt or I forgot to add something to .pro ?

    
asked by anonymous 08.11.2017 / 21:32

0 answers