sashoalm
sashoalm

Reputation: 79655

Is there an #ifdef in Qt to determine if we're building for Android

I have an Android-specific fix in my Qt application, and I want that code to be compiled only when building for Android.

Is there an #if or #ifdef that will do that?

Upvotes: 15

Views: 6790

Answers (1)

László Papp
László Papp

Reputation: 53195

Yes, you can find it in the documentation, so just use:

#ifdef Q_OS_ANDROID

Upvotes: 18

Related Questions