Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [CLOSED] Conditionally Loading Native Code to Mobile Apps
Qt 6.11 is out! See what's new in the release blog

[CLOSED] Conditionally Loading Native Code to Mobile Apps

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 1.5k 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.
  • S Offline
    S Offline
    SteveG
    wrote on last edited by
    #1

    Since Windows phone is being added to Qt 5.3, are there any examples of conditionally adding native code to Android, iOS and Windows phone apps?

    Thanks.

    Steve

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean besides the platform #ifdef's and the scopes in the pro file like for the desktop version ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SteveG
        wrote on last edited by
        #3

        Samuel,

        What do you mean by "scopes in the pro file?" If I have native source code (e.g., Java for Android) that I only want included when I build an Android app, how would I do this? BTW, is there a syntax guide or manual for .pro files?

        Thanks.

        Steve

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          This:
          @
          macx {

          OS X specific stuff

          } else ios {

          iOS specific stuff

          } etc…
          @

          Yes there is, look for "QMake manual" in Qt's documentation

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SteveG
            wrote on last edited by
            #5

            Samuel,

            I found more info as you suggested. Are there any examples interfacing Qt with native code (e.g., QML or C++ invoking Java methods for Android, etc.)?

            Thanks.

            Steve

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              For Android there's JNI and you can find helper classes for that in qtandroidextras

              For iOS you can use Objective-C++ and the qtmacextras module offers some helper stuff already

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SteveG
                wrote on last edited by
                #7

                Samuel,

                I'll look into these. Thanks again for your help.

                Steve

                1 Reply Last reply
                0

                • Login

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