Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Is there any way to Import headers according to the os platform ??

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

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 467 Views
  • 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.
  • Ramkumar RammohanR Offline
    Ramkumar RammohanR Offline
    Ramkumar Rammohan
    wrote on last edited by Ramkumar Rammohan
    #1

    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.

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

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

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      4

      • Login

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