View Full Version : Different behaviour for Simulator and Device
lyhoanghai
14th October 2010, 11:06
Hello,
I want my application to behaviour differently when it is runned in simulator and device.
If there any way to do that?
Thanks
Hai
everyourgokul
16th October 2010, 19:43
Hi
You didnot specified anything more about your problem.
But generally using macros you can achieve that ..
#ifdef SIMULATIOR
//do something for simulator
#elseif
//do something else for the target device
#endif
Br,
Gokul
http://gokulkartha.blogspot.com
wysota
16th October 2010, 22:32
Q_WS_SIMULATOR is defined when a simulator compilation is performed. Q_WS_MAEMO_5 or equivalent is defined when you build for the real device.
lyhoanghai
20th October 2010, 12:32
Thanks wysota.
A quick search for Q_WS_SIMULATOR constants leads me to this page with more detail:
http://wiki.forum.nokia.com/index.php/Using_environment_macros_to_differentiate_platform s
wysota
20th October 2010, 12:47
QtGlobal definitions and scroll down.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.