12

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?

sashoalm
  • 75,001
  • 122
  • 434
  • 781

1 Answers1

16

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

#ifdef Q_OS_ANDROID
László Papp
  • 51,870
  • 39
  • 111
  • 135