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
QtWS25 Last Chance

Question about QML import

Scheduled Pinned Locked Moved QML and Qt Quick
qmlquick
3 Posts 2 Posters 1.2k 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.
  • S Offline
    S Offline
    shav
    wrote on 18 Sept 2015, 08:06 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 18 Sept 2015, 10:47 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/)

      S 1 Reply Last reply 18 Sept 2015, 18:33
      0
      • M mcosta
        18 Sept 2015, 10:47

        @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

        S Offline
        S Offline
        shav
        wrote on 18 Sept 2015, 18:33 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

        2/3

        18 Sept 2015, 10:47

        • Login

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