小编Tho*_*s13的帖子

如何将qt5 qml插件部署到android?

我试图从Qt 5.1.0安装程序导入TimeExample Qt快速扩展插件.

libqmlqtimeexampleplugin.so 是成功建造的 build-plugins-Android_for_arm_GCC_4_6_Qt_5_1_0-Debug/imports

然后我从Qt Creator创建了简单的Qt Quick2应用程序(内置元素).我应该在应用程序项目文件中添加什么来获取输出".apk"包中的QML插件?

现在它说:

W/Qt(23528):assets:/qml/TimeExampleTest/main.qml:2():assets:/qml/TimeExampleTest/main.qml:2:1:模块"TimeExample"未安装

main.qml

 import QtQuick 2.0

 import TimeExample 1.0 // import types from the plugin

 Rectangle {
    width: 360
    height: 360
    Text {
        text: qsTr("Hello World")
        anchors.centerIn: parent
    }
    MouseArea {
       anchors.fill: parent
        onClicked: {
          Qt.quit();
       }
    }

   Clock { // this class is defined in QML (imports/TimeExample/Clock.qml)

        Time { // this class is defined in C++ (plugin.cpp)
            id: time
      }

        hours: time.hour
      minutes: time.minute

    }
}
Run Code Online (Sandbox Code Playgroud)

TimeExampleTest.pro

folder_01.source = qml/TimeExampleTest …
Run Code Online (Sandbox Code Playgroud)

android qml qt5

10
推荐指数
1
解决办法
3147
查看次数

标签 统计

android ×1

qml ×1

qt5 ×1