Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96898

Sub-project created with qt_add_qml_module doesn't work on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2, 6.3.0
    • 6.2.0 RC
    • Build System: CMake
    • None
    • Archlinux
    • Android
    • 7a7064e14f094e843e1ee832cc927e86f887621a 47cb1bb53f4882ca7f00e2286f279279d8b74715 d05da5f306c7c30616d33fe540e64dd2fee46924 b1fc45dbbfcca3ed0c489c01a5faa2f87ed09a35

    Description

      I tried build application as described at one of new posts in blog about qt_add_qml_module with CMake. It works on desktop linux but it fails on Android with error:

      W libqt_add_qml_module_test_arm64-v8a.so: qrc:/Test/main.qml:11:3: ExtraButton is not a type

      Also I found out that without that 2 modifications QtCreator doesn't see plugins declared by qt_add_qml_module:

       

      // CMakeList.txt from executable
      set(QML_IMPORT_PATH ${CMAKE_BINARY_DIR} CACHE STRING "" FORCE)
      // CMakeList.txt from sub-project I had to add DESIGNER_SUPPORTED option which was not described as required
      qt_add_qml_module(test_extra
          URI "TestExtra"
          VERSION 1.0
          QML_FILES
              ExtraSingleton.qml
              ExtraButton.qml
          DESIGNER_SUPPORTED
      )
      

      I attach minimal working project

       

      Attachments

        1. CMakeLists.txt
          2 kB
          anubirux
        2. main.cpp
          0.7 kB
          anubirux
        3. main.qml
          0.2 kB
          anubirux
        4. CMakeLists-1.txt
          0.9 kB
          anubirux
        5. ExtraButton.qml
          0.1 kB
          anubirux
        6. ExtraSingleton.qml
          0.1 kB
          anubirux
        7. qtbug96898.tar.gz
          2 kB
          Fabian Kosmale
        For Gerrit Dashboard: QTBUG-96898
        # Subject Branch Project Status CR V

        Activity

          People

            semlanik Alexey Edelev
            anubirux anubirux
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: