pyside_pyconar2011

March 16, 2018 | Author: willerdavis | Category: Unix Software, System Software, Free Software, Software, Free Software Projects


Comments



Description

PySide: An introduction to Python/Qt DevelopmentBruno Araújo, Willer Moreira Nokia Technology Institute NOKIA TECHNOLOGY INSTITUTE INDT Non-profit Research & Development Center, focused on developing new concepts, products and solutions to areas related to mobile technologies and the Internet. Manaus Recife Our key areas are: • Brasília Software and User Interface Network T echnologies Product and Manufacturing T echnologies Service Experience Nokia Technology Institute • São Paulo • • Who am I? Computer scientist ● Software developer at INdT ● Member of the PyMaemo and PySide teams ● Nokia Technology Institute . Schedule Introduction to Qt ● PySide description ● PySide + QtQuick ● PySide Assistant (PSA) ● Nokia Technology Institute . Introduction to Qt Nokia Technology Institute . Qt Framework Cross-platform application development framework. Nokia Technology Institute . A little while after Nokia's acquisition of Trolltech Qt started being distributed under the LGPL license. PySide == Python + Qt PySide is how we call the Python bindings of the Qt Framework produced by INdT and released under the LGPL license. Nokia Technology Institute . PySide description Nokia Technology Institute Nokia Technology Institute . PySide toolchain ● PySide: the thing you import libpyside: deals with Qt signals/slots libshiboken: helps in the interfacing of Python and C++ ● ● Nokia Technology Institute Nokia Technology Institute . Binding assembly line ● 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 ● ● . 2 Harmattan (Nokia N950/N9) MeeGo Netbook and Handset Linux Distros: the community is taking care of these ● Ports for Debian. ArchLinux. Ubuntu. Fedora.Supported platforms ● ● ● ● Maemo 5 (Nokia N900) MeeGo 1. 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.qt.com/wiki/Building_PySide. . ● ● Nokia Technology Institute Nokia Technology Institute .nokia.... if you want to build all from source..just go to http://developer. Roadmap ● Memory optimization Investigation of some ideas to reduce PySide memory footprint Python 3 support ● ● ● According to a already done investigation.pyside. 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.org/roadmap Nokia Technology Institute Nokia Technology Institute . PySide + QtQuick Nokia Technology Institute Nokia Technology Institute . 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 ● Nokia Technology Institute Nokia Technology Institute . ● In QML.What is QML? Qt Meta-Object Language (QML) is a Javascript-based declarative language for designing user interface centric applications. ● Nokia Technology Institute Nokia Technology Institute . a user interface is specified as a tree of objects with properties. QML ● Example: Nokia Technology Institute Nokia Technology Institute . PySide + QML You can easily create an application using PySide and QML together ● First demo: Simple PySide+QML app ● Nokia Technology Institute Nokia Technology Institute . Using Qt signals and slots ● One way to use a Python Qt slot from QML is calling it directly ● Function declaration Passing it to QML ● ● Calling it in QML Nokia Technology Institute Nokia Technology Institute . Using Qt signals and slots ● There are other ways of connecting signals and slots in QML ● These other ways are in the PySide wiki: http://developer.com/wiki/Connecting_QML_Signals_in_PySide Nokia Technology Institute Nokia Technology Institute .nokia.qt. PySide Assistant (PSA) Nokia Technology Institute Nokia Technology Institute . there are templates available to Ubuntu Maverick and Natty.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. Maemo 5 (N900) and Meego 1.2 ● Nokia Technology Institute Nokia Technology Institute . ● At the moment. which in turn is based on Python Distutils and Debian's dpkg. PSA usage ● PSA supports four commands: ● ● ● ● init: creates the initial project layout build-deb: builds a Debian binary package update: easily updates certain project properties list: displays available templates Nokia Technology Institute Nokia Technology Institute . )... test (.) $ psa build-deb install at the target ($ sudo dpkg -i ..) $ psa update –app-name=”NewApp” $ psa build-deb (and so on) Nokia Technology Institute Nokia Technology Institute ...hack...hack some more..PSA usage ● Usual workflow: ● ● ● ● ● ● ● ● $ psa init sampleproject ubuntu-qml (... PSA demo ● Second demo: creating and installing a sample app in Ubuntu Nokia Technology Institute Nokia Technology Institute . Questions Nokia Technology Institute Nokia Technology Institute . org/pyside Willer Moreira [email protected] Nokia Technology Institute Nokia Technology Institute .org http://lists.org.pyside.gitorious.Where to find us http://www.org/listinfo/pyside #pyside at Freenode http://qt.openbossa. Thanks! Nokia Technology Institute Nokia Technology Institute .
Copyright © 2024 DOKUMEN.SITE Inc.