[PyQt] Python wrappers for QML/ "Qt Quick"?

Giovanni Bajo rasky at develer.com
Tue Mar 9 12:07:23 GMT 2010

On 3/9/2010 11:37 AM, Ville M. Vainio wrote:
> On Mon, Mar 8, 2010 at 4:50 PM, Attila Csipa<pyqt at csipa.in.rs>  wrote:
>> Note that QML itself will be part of mainline Qt4.7, so I guess it's just a
>> question of time (read: Phil's schedule :) until a bit more 'official'
>> support for QML + PyQt appears.
> There is a bit more to think about than just wrapping Qml* classes;
> there are multiple interesting paths for creating QML + Python apps.
> For one, it should be possible to avoid loading the PyQt libs
> altogether (in the interest of smaller footprint&  faster launch) -
> just create a C++ application like qmlviewer, and embed python
> interpreter to that. All the Qt facing code would be on the javascript
> side, and the javascript code would be able to access the embedded
> python interpreter through some exposed stubs. In the first phase,
> even being able to exec/eval strings would get you started.

I personally don't see a good use case for putting Python somehow within 
QML. QML already comes with its scripting language and bindings 
(Javascript), so unless you are on a religion war, I don't see much 
sense in putting Python in there.

It might make more sense to have a way to export PyQt classes to QML, 
that is implement QMLElement in Python rather than in C++, and make them 
available to QML itself.
Giovanni Bajo
Develer S.r.l.

More information about the PyQt mailing list