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

QQuickView fails when load element from assets:/ in Android

    XMLWordPrintable

Details

    Description

      I compiled stable branch of Qt with android-g++ configuration, created simple QtQuick 2 project with 2 files main.qml and MyButton.qml

      MyButton.qml:
      import QtQuick 2.0

      Rectangle {
      width: 50
      height: 50
      color: "green"
      }

      main.qml:
      import QtQuick 2.0

      Rectangle {
      width: 360
      height: 360
      color: "yellow"
      MyButton {}
      }

      run fails with error message
      W/Qt (21559): assets:/qml/q5test01/main.qml:7 (): assets:/qml/q5test01/main.qml:7:5: MyButton is not a type

      If i manually copy qml file to /sdcard/q5test01/ and changed for test in qtquick2applicationviewer.cpp

      void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file) {
      #ifdef Q_OS_ANDROID
      setSource(QUrl("/sdcard/q5test01/main.qml"));
      #else
      ...
      #endif
      }

      it works.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              spise Andrew Sposobin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes