Python and QT For Android
Python and QT For Android
Martin Kolman
Red Hat
http://www.modrana.org/pyconpl2013
martin.kolman@gmail.com
@M4rtinK
1
Overview
● Android applications
● Writing Android
applications with
Python and Qt
● How it works
● The pydroid project
● Examples
● Acknowledgment
2
What is Android ?
3
Android applications
6
Lets put it all together !
So that:
● applications can be written entirely in Python
● Qt/QML can be used for the GUI
● the applications can be easily debugged
● all binary components can be recompiled at will
● the end result is a standalone Google Play
compatible APK package
● deployment is as easy as possible
7
How it works
8
Python for Android
9
PySide Python‑Qt bindings
10
Optional : Qt Components
11
What needs to be in the package
12
How to create the package
13
How everything gets in place on first start
14
How it looks like
15
Not only Android applications
16
The previous image shows
17
PySide for Android guide
18
The pydroid project
19
pydroid - features
install
● sudo python setup.py install
23
Generate an example application
24
Deploying with Qt Creator
25
Future plans -> Qt5 !
26
Qt5 Python bindings
● PySide
● PyOtherSide
● PyQt
27
PySide
28
Qt5 - PyOtherSide
30
Qt5 - PyQt
31
Acknowledgements & sources
● Aaron Richiger for the wonderful pydroid project
● THPs PySide for Android – showing that this is possible
● Adrià Cereto-Massagué – integrated & improved THPs patches for Shiboken and
PySide
● the Android-Python2.7 project – solved the APK bundling issue
● the Kivy project - provides Android-buildable Python 2.7
● the BlackBerry-Py Building PySide guide – I’ve used this as a base when making the
Android build scripts
● the Necessitas project – made Qt on Android possible
– also provides the Necessitas Qt Creator used for by the example project for building standalone
APKs
● Qt-Project – provides the GUI toolkit :)
● PySide – provides the Python-Qt bindings Ineans Qt Components – with small
modifications used in the example application & project
32
Thanks !
● Questions ?
33