diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-12-14 16:04:22 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-12-14 15:11:24 +0000 |
commit | f463b46660f4fb88361c82cb59f98546d5eae00b (patch) | |
tree | 876cf5129aba857e65946c7839022cb721063e50 | |
parent | 58e385ff530b64263ba52c36475b727b556f1d73 (diff) |
Update README
Change-Id: Iaef86df486df310c6338f441b58937acaa158a09
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r-- | README | 31 |
1 files changed, 28 insertions, 3 deletions
@@ -19,9 +19,34 @@ Credits for the original idea and the groundwork go to Attila Csipa: Build and install like any Qt module. -## Qt Creator - -When building the example in Qt Creator, tick "Use Gradle" in +## Getting Started + +Link to the library, and deploy the desired Android packages +in the application .pro file: + + QT += qmlandroid + QMLANDROID_PACKAGES = app view widget + +A minimal QML example that can replace the main.qml when using +the Qt Quick Application template in Qt Creator. The rest can +stay the same, using QQmlApplicationEngine to load the main.qml: + + import android 0.21 + import android.app 0.21 + import android.view 0.21 + import android.widget 0.21 + + Activity { + contentView: Button { + text: "Button" + } + } + +Using an options menu in Activity requires changing the activity +type in AndroidManifest.xml. The default activity type for Qt apps +is "org.qtproject.qt5.android.bindings.QtActivity", which must be +changed to "qt.android.app.QmlActivity". In order to create the +file, click "Create Templates" in Qt Creator: Projects -> Build & Run -> Build Steps -> Build Android APK |