Results 1 to 5 of 5

Thread: Different behaviour for Simulator and Device

  1. #1
    Join Date
    Aug 2010
    Posts
    19
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo
    Wiki edits
    9

    Default Different behaviour for Simulator and Device

    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

  2. #2

    Default Re: Different behaviour for Simulator and Device

    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

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Different behaviour for Simulator and Device

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. The following user says thank you to wysota for this useful post:

    lyhoanghai (20th October 2010)

  5. #4
    Join Date
    Aug 2010
    Posts
    19
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo
    Wiki edits
    9

    Default Re: Different behaviour for Simulator and Device

    Thanks wysota.

    A quick search for Q_WS_SIMULATOR constants leads me to this page with more detail:
    http://wiki.forum.nokia.com/index.ph...iate_platforms

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Different behaviour for Simulator and Device

    QtGlobal definitions and scroll down.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. how to run two instances of Qt simulator in windows xp.
    By hasnain in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 15th September 2010, 08:31
  2. Check if application is running in simulator
    By lyhoanghai in forum Qt Programming
    Replies: 0
    Last Post: 30th August 2010, 12:38
  3. Font in simulator and S60 device don't look the same
    By Erazem in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 20th August 2010, 20:57
  4. Compile on simulator but not on Symbian
    By curreli in forum Qt Programming
    Replies: 2
    Last Post: 13th August 2010, 09:18
  5. GPS in Simulator
    By Guilo in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 7th July 2010, 11:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.