Pyside: An Introduction To Python/Qt Development: Bruno Araújo, Willer Moreira
Pyside: An Introduction To Python/Qt Development: Bruno Araújo, Willer Moreira
Non-profit Research & Development Center, focused on developing new concepts, products and solutions to areas related to mobile technologies and the Internet.
Manaus Recife
Braslia
Software and User Interface Network T echnologies Product and Manufacturing T echnologies Service Experience
Nokia Technology Institute
So Paulo
Who am I?
Computer scientist Software developer at INdT Member of the PyMaemo and PySide teams
Schedule
Introduction to Qt
Qt Framework
Cross-platform application development framework. A little while after Nokia's acquisition of Trolltech Qt started being distributed under the LGPL license.
Nokia Technology Institute
PySide == Python + Qt
PySide is how we call the Python bindings of the Qt Framework produced by INdT and released under the LGPL license.
PySide description
PySide toolchain
PySide: the thing you import libpyside: deals with Qt signals/slots libshiboken: helps in the interfacing of Python and C++
Qt headers: the basic information about Qt libraries comes from here Type system files: here the binding developer modifies the collected information to fit the Python language. Handwritten code: code to handle the C++
Nokia Technology Institute Nokia Technology Institute
Supported platforms
Maemo 5 (Nokia N900) MeeGo 1.2 Harmattan (Nokia N950/N9) MeeGo Netbook and Handset Linux Distros: the community is taking care of these
Ports for Debian, Ubuntu, ArchLinux, Fedora, openSUSE and Mandriva MacOS X: Maintained by Markus Ullmann
Microsoft Windows: Maintained by Roman Lacko Android: experimental port done by Thomas Perl
Nokia Technology Institute Nokia Technology Institute
How to install
PySide is available on all cited platforms via their standard installation procedures (except Android) However, if you want to build all from source... ...just go to http://developer.qt.nokia.com/wiki/Building_PySide.
Roadmap
Memory optimization Investigation of some ideas to reduce PySide memory footprint Python 3 support
According to a already done investigation, there are no insurmountable obstacles for Python 3 support. New API features
Make PySide API more 'pythonic' The up-to-date roadmap for PySide project can be found at
http://www.pyside.org/roadmap
Nokia Technology Institute Nokia Technology Institute
PySide + QtQuick
What is QtQuick?
QtQuick is a collection of technologies that allows developers and UI designers to work together for creating responsive and touch-enabled UIs for all platforms Qt supports. One of these technologies is QML
What is QML?
Qt Meta-Object Language (QML) is a Javascript-based declarative language for designing user interface centric applications. In QML, a user interface is specified as a tree of objects with properties.
QML
Example:
PySide + QML
You can easily create an application using PySide and QML together First demo: Simple PySide+QML app
Calling it in QML
What is PSA?
PSA is a set of Python scripts and file templates that allows painless creation of binary Debian packages from pure Python applications. It is based on python-stdeb, which in turn is based on Python Distutils and Debian's dpkg. At the moment, there are templates available to Ubuntu Maverick and Natty, Maemo 5 (N900) and Meego 1.2
PSA usage
init: creates the initial project layout build-deb: builds a Debian binary package update: easily updates certain project properties list: displays available templates
PSA usage
Usual workflow:
$ psa init sampleproject ubuntu-qml (...hack...) $ psa build-deb install at the target ($ sudo dpkg -i ...), test (...hack some more...) $ psa update app-name=NewApp $ psa build-deb (and so on)
PSA demo
Questions
Where to find us
Thanks!