QGEN: A Python to Qt/C++ translator Martin Stokland Jensen - DUO
Creating Ubuntu apps with Qt an Python
-
Upload
danial-behzadi -
Category
Software
-
view
295 -
download
0
Transcript of Creating Ubuntu apps with Qt an Python
![Page 2: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/2.jpg)
2016 Pycon Iran 2
ubuntu SDK
![Page 3: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/3.jpg)
2016 Pycon Iran 3
Python bindings for Qt
● PyQt
● PySide
● PyOtherSide
![Page 4: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/4.jpg)
2016 Pycon Iran 4
PyQt
● Pros– GPL license
– Qt 4 & 5
– Python 2 & 3
● Cons– Synchronous by default
– Slow startup
● Riverbank Computing in 1998● Cpython + Python code + Bindings + Qt● Python Interpreter uses Qt to display UI
![Page 5: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/5.jpg)
2016 Pycon Iran 5
PySide
● Pros– Python 2 & 3
● Cons– Synchronous by default
– Big size (> 15 MiB)
– Slow startup
– Qt 4 only
● Nokia in 2009● Cpython + Python code + Bindings + Qt● Python Interpreter uses QML to display UI● LGPL license
![Page 6: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/6.jpg)
2016 Pycon Iran 6
PyOtherSide
● Pros– Asynchronous calls
– Small size (< 150 KiB)
– Fast startup
● Cons– BSD license
● Thp (from Mer) in 2011● Qt Plugin + Python library● QML as frontend, uses Python as backend● Qt 5 and Python 3
![Page 7: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/7.jpg)
2016 Pycon Iran 7
PyOtherSide Platforms● Desktop (GNU/Linux, Windows, Mac, etc.)
– Fully Supported
● GNU/Linux phones (Ubuntu, Sailfish)– Fully Supported
● Other phones– Android: Ship Python 3, Qt 5 and PyOtherSide in app
– Blackberry: Ship Qt 5 and PyOtherSide in app
![Page 8: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/8.jpg)
2016 Pycon Iran 8
PyOtherSide API
● QML Methods
addImportPath(p)
setHandler(e, c)
importModule(n, c)
call(f, a, c)
evaluate(expr)
● QML Signals
recieved(data)
error(traceback)
● Python Module
import pyotherside
pyotherside.send(*args)
pyotherside.atexit(f)
![Page 9: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/9.jpg)
2016 Pycon Iran 9
Sample code and explanation
Watch it live!
![Page 10: Creating Ubuntu apps with Qt an Python](https://reader036.fdocuments.in/reader036/viewer/2022073023/587a44ce1a28ab00148b50b1/html5/thumbnails/10.jpg)
2016 Pycon Iran 10
Thanks!