[CLOSED] Conditionally Loading Native Code to Mobile Apps
-
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
-
Hi,
Do you mean besides the platform #ifdef's and the scopes in the pro file like for the desktop version ?
-
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
-
This:
@
macx {OS X specific stuff
} else ios {
iOS specific stuff
} etc…
@Yes there is, look for "QMake manual" in Qt's documentation
-
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
-
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
-
Samuel,
I'll look into these. Thanks again for your help.
Steve