Here’s how I do it:

TARGET = MyProgram
VERSION = 1.0.0.0


DEFINES += \
  APP_VERSION=\"\\\"$$VERSION\\\"\" \
  APP_NAME=\\\"$$TARGET\\\"

I then access the TARGET as the constant APP_NAME and VERSION as the constant 
APP_VERSION

Karl

On Sep 25, 2014, at 8:04 AM, rap <r...@dlc.fi> wrote:

> Is there a way to read the contents of the qmake project file (.pro) built-in 
> variables, specially the "TARGET" variable?  I'm doing 
> a bunch of small examples and getting the TARGET (.exe) name to my QWindow 
> class would help to pass the name to setTitle() 
> consistently and automatically.
> 
> Thanks,
> /Risto 
> 
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to