Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Macro for Qt Simulator in .pro and source files.

    Mobile and Embedded
    3
    5
    7993
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rule last edited by

      Hello, I just want to know is there are any way to know, that we are building application for Qt Simulator target.
      For example, for Maemo5 device in .pro file I can make branch by maemo5 directive:
      @maemo5 {
      dosomething
      }@
      and in the .cpp and .h files I can check by Q_WS_MAEMO_5 macro:
      @#if defined(Q_WS_MAEMO_5)
      dothomething
      #endif
      @

      But what about Qt Simulator, is there any predefined macro and directive for it?
      Surely, I can pass something like "DEFINES+=QT_SIMULATOR" to qmake, and check it in the .pro and sources.
      @contains($$DEFINES,"QT_SUMULATOR") {
      doSomething
      }
      @
      But it's not good solution, it's only workaround.

      1 Reply Last reply Reply Quote 0
      • K
        kamalakshantv last edited by

        It seems as of now there are only workarounds

        Another one is discussed "here(http://discussion.forum.nokia.com/forum/showthread.php?187052-Managing-different-SDK-s-in-pro-file)":http://discussion.forum.nokia.com/forum/showthread.php?187052-Managing-different-SDK-s-in-pro-file.

        1 Reply Last reply Reply Quote 0
        • S
          silvansky last edited by

          for now there is QT_SIMULATOR macro for source files (in the latest Nokia Qt SDK)
          but I don't know if there is somethong for .pro files

          UPD:
          in .pro files you can use

          simulator {
          # do something
          }

          1 Reply Last reply Reply Quote 0
          • R
            rule last edited by

            [quote author="silvansky" date="1278666566"]for now there is QT_SIMULATOR macro for source files (in the latest Nokia Qt SDK)
            but I don't know if there is somethong for .pro files

            UPD:
            in .pro files you can use

            simulator {
            # do something
            }[/quote]

            O, It's brilliant, Just I need. Thank you a lot.

            1 Reply Last reply Reply Quote 0
            • K
              kamalakshantv last edited by

              [quote author="silvansky" date="1278666566"]for now there is QT_SIMULATOR macro for source files (in the latest Nokia Qt SDK)
              but I don't know if there is somethong for .pro files

              UPD:
              in .pro files you can use

              simulator {
              # do something
              }[/quote]

              Thank you

              1 Reply Last reply Reply Quote 0
              • First post
                Last post