PDA

View Full Version : How to get the run configuration in my qt program?



HiJack
26th June 2010, 09:07
Yes, is there a way to find my app's build configuration or run configuration when the application is running?
to find which OS it is running , or which emulator and device etc. ??

Lykurg
26th June 2010, 09:11
See Q_WS_MAC, Q_OS_WIN32 etc.

tbscope
26th June 2010, 09:13
There's a difference between a build configuration and a run configuration.

Building is when you actually build the code.
Running is when you actually run the code.

When building, you can use qmake to check for the operating system and other system variables. See the qmake documentation.
But I think you want to know the operating system when you're running the program? Then look at this for example:
http://doc.qt.nokia.com/4.6/qtglobal.html#Q_WS_WIN

Edit: I always seem to be 5 seconds slower than Lykurg.

HiJack
26th June 2010, 09:34
There's a difference between a build configuration and a run configuration.

Building is when you actually build the code.
Running is when you actually run the code.

When building, you can use qmake to check for the operating system and other system variables. See the qmake documentation.
But I think you want to know the operating system when you're running the program? Then look at this for example:
http://doc.qt.nokia.com/4.6/qtglobal.html#Q_WS_WIN

Edit: I always seem to be 5 seconds slower than Lykurg.

thanks guy . but also maybe i want to know which target my app is running . such as s60 emulator and s60 device. i'll test if they will display a same result.

Lykurg
26th June 2010, 09:58
Edit: I always seem to be 5 seconds slower than Lykurg.:) Yeah, luky me! ...this time. (I remember one year ago, I always have "lost" against spirit.)