Scenario:
I am have a Qt App with a QtApp.pro
some C++ code in main.cpp
. To keep this question simple, please assume that it is a blank QtQuick2 app created from the QtCreator Application wizard.
Question:
Is it possible to run some Qt commands in the .pro
files or C++ code in main.cpp
?
What if I want to run this git command git rev-parse HEAD
from my QtApp.pro
or main.cpp
and embed the commit ID somewhere on my UI to show the commit ID of the release? Is it possible? How?
Environment:
The Qt version I am running is Qt 5.9.3
Operating System : MacOS High Sierra