QtDD13 - Thomas Perl - Python 3 and Qt 5 with QML

preview_player
Показать описание
Recorded at the Qt Developer Days in Berlin in 2013.

Short Abstract:

This presentation highlights the history of Python-on-Mobile development (PySide, Python 2 with Qt4), followed by a quick reality check of real-world mobile Python applications and their shortcomings, and then presents a novel approach to use Python 3 and Qt 5 with a custom language binding framework that's tailored to the Python-QML use case to create fluid, non-blocking and powerful mobile applications with Python 3 and QML using Qt 5.

Abstract:

ifficulties and shortcomings of this approach as it relates to ""pure"" QML applications.

In the second part, a new, custom language binding is presented that works with Python 3 (Python 2 is also supported for those who can't switch to Python 3 yet) and Qt 5 (Qt 4 is also still supported). While not API-compatible with PySide/PyQt, the focus on making the API work well for QML user interfaces that need a Python backend allows for a much smaller memory footprint (both runtime and download), quicker startup times and asynchronous request handling (so calls into Python never block the QML UI).

As an example of porting existing Python applications from PySide/QML to the new binding framework, we then analyze the port of gPodder from PySide to the new framework, and compare startup time, download size, memory footprint and UI responsiveness.

Presenter Biography:
Thomas Perl is an Austrian computer scientist and independent developer. He has been working with Python since 2005 and Qt since 2010 (before that, he's been working with Gtk+ since 2005). In recent years, Thomas has developed some cross-platform applications such as gPodder, which runs on Desktop and mobile devices, written completely in Python with a QML user interface on mobile. Thomas is a regular at Vienna's monthly Python User Group Meetup (PyUGAT) and has written tutorials and given talks about how to best use Python for development on mobile devices.
Рекомендации по теме
Комментарии
Автор

The tool for creating PyQt compatible bindings is also available. It is called SIP.

RECORDthenRETURN
Автор

Wow, this is pretty awesome, thank you!

1. Do I understand correctly that you share a single Python process / instance over all Python {} clauses in an application?

2. At the moment I'm coding the reading, parsing and writing of multiple different text files in a C++ QObject descendant that I instantiate in my QML file (in a Repeater clause). I can imagine rather using a Python script and PyOtherSide for the parsing directly from the QML also from within the Repeater, but is there perhaps a nicer way to use PyOtherSide directly from my C++ QObject?

CharlBotha
join shbcf.ru