Skip to content

qtproject/playground-qtqmlandroid

Repository files navigation

# QML for Android

QML wrappers for native Android controls.

## Introduction

This is a former Qt hackathon project born in November 2014.
Credits for the original idea and the groundwork go to Attila Csipa:
- http://achipa.blogspot.no/2014/11/qml-wrappers-for-native-android.html
- http://achipa.blogspot.no/2014/11/native-ui-in-qt-on-android-without.html

## Requirements

- Qt 5.4 or later
- Android 5.x
- Gradle

## Installation

Build and install like any Qt module.

## Getting Started

Link to the library, and deploy the desired Android packages
in the application .pro file:

    QT += nativeandroid

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 "org.qtproject.qt5.android.bindings.app.QtNativeActivity".
In order to create the file, click "Create Templates" in Qt Creator:

    Projects -> Build & Run -> Build Steps -> Build Android APK

## Notes

The Android 5.x dependency is not going to stay. Proper Android version
handling is just missing for the time being. The goal of the hackathon
project was to create a visually stunning demo, not a polished product. ;)

About

No description, website, or topics provided.

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE.FDL
Unknown
LICENSE.GPLv3
Unknown
LICENSE.LGPLv3

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published