Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Macro for Qt Simulator in .pro and source files.
Forum Updated to NodeBB v4.3 + New Features

Macro for Qt Simulator in .pro and source files.

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 8.3k Views 1 Watching
  • 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 Offline
    R Offline
    rule
    wrote on 6 Jul 2010, 06:45 last edited by
    #1

    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
    0
    • K Offline
      K Offline
      kamalakshantv
      wrote on 6 Jul 2010, 09:39 last edited by
      #2

      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
      0
      • S Offline
        S Offline
        silvansky
        wrote on 9 Jul 2010, 09:09 last edited by
        #3

        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
        0
        • R Offline
          R Offline
          rule
          wrote on 9 Jul 2010, 19:08 last edited by
          #4

          [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
          0
          • K Offline
            K Offline
            kamalakshantv
            wrote on 10 Jul 2010, 07:25 last edited by
            #5

            [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
            0

            2/5

            6 Jul 2010, 09:39

            • Login

            • Login or register to search.
            2 out of 5
            • First post
              2/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved