Is there any way to Import headers according to the os platform ??

  • Developing applications in android, ios and linux.
    Problem start here Qt.WebEngine works well with linux but when go for android can't able to include the class so we go for Qt.WebView, it works fine for android.

    Is there any way to import the headers conditionally according to the os platform like Ifdef Qt.platform.os === "android" { import Qt.webView 1.0 } else Qt.platform.os === "linux" { import Qt.WebEngineView 1.0 }... Suggest me if any other possible ways also.

  • Qt Champions 2017

    No conditional imports in QML. You can try using the Loader and set the source property based on some condition.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.