Project

General

Profile

Compilation of Qt Quick Components for Android

I found guide about how to install qt components for Android.

The guide is based on this description, and it uses already compiled android qt components module. It is more convenient to use this guide.

I just repost this guide here.

  1. Download this package and

copy "imports" and "plugins" folders to the "qml" directory in your

project's folder

  1. Add the following to your .pro file:
 android {
     qmlcomponents.source = qml/imports
     qmlcomponents.target = /
     DEPLOYMENTFOLDERS += qmlcomponents
     qmlplugins.files = \
         qml/plugins/libandroidplugin_1_1.so \
         qml/plugins/libqtcomponentsplugin_1_1.so
         x86 {
             qmlplugins.path = /libs/x86
         } else: armeabi-v7a {
             qmlplugins.path = /libs/armeabi-v7a
         } else {
             qmlplugins.path = /libs/armeabi
         }
     INSTALLS += qmlplugins
 }
  1. Add the following code to your main.cpp:
#include <QtDeclarative>
#ifdef Q_OS_ANDROID
     viewer->addImportPath("/imports/");
     viewer->engine()->addPluginPath(QDir::homePath()+"/../lib");
#endif

NOTE: the following code should work on Alpha 4:

 #ifdef Q_OS_ANDROID
     viewer->addImportPath("/imports/");
 viewer->engine()->addPluginPath(QApplication::applicationDirPath()+"/lib");
 #endif
  1. In Necessitas Qt Creator, go to Projects->Run Settings->Package

Configurations (hit on "details")->Libraries (it's one of the tabs)

and put a tick on the QtSystemInfo library

  1. Deploy the package as you usually do via QtCreator and enjoy Qt

Componens by Koying :)

Qt quick components plugin for Android based on Symbian components