Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Question about QML import
Forum Updated to NodeBB v4.3 + New Features

Question about QML import

Scheduled Pinned Locked Moved QML and Qt Quick
qmlquick
3 Posts 2 Posters 1.3k Views 2 Watching
  • 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.
  • shavS Offline
    shavS Offline
    shav
    wrote on last edited by
    #1

    Hi everyone!

    I have a small question about QML import directive. I have a QML file with header:

    import QtQuick 2.5
    import QtQuick.Controls 1.4
    import QtQuick.Controls.Styles 1.4
    import QtQuick.Dialogs 1.2
    import QtQuick.Window 2.2
    import com.consultica.nestlean 1.0
    

    My application will work on OS X and iOS. But for iOS I don't need module:

    import com.consultica.nestlean 1.0
    

    How I can disable it for iOS platform but enable for OSX? I know only one way to do this. It's create a separate QML file for iOS. But I don't like this way.

    Thanks for the any help!

    Mac OS and iOS Developer

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      @shav said:

      import com.consultica.nestlean 1.0

      If you import that module probably your code uses some resources (Objects, functions, ..) and then you have to manage the 2 platforms.

      I don't think is so bad having different files for different platform

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      shavS 1 Reply Last reply
      0
      • M mcosta

        @shav said:

        import com.consultica.nestlean 1.0

        If you import that module probably your code uses some resources (Objects, functions, ..) and then you have to manage the 2 platforms.

        I don't think is so bad having different files for different platform

        shavS Offline
        shavS Offline
        shav
        wrote on last edited by
        #3

        @mcosta Thanks for the reply. If I will not find any other ways I'll use different files.

        Mac OS and iOS Developer

        1 Reply Last reply
        0

        • Login

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