[Qt-qml] interfaces for QML Python Bindings

Kristian Mueller kristian at mixd.tv
Thu Sep 23 19:19:55 CEST 2010


Hi QML Developers,

we've been developing a Python <-> QML interface. It's already working
fine for us and we plan to release it soon.

Unfortunately we need two hooks in the Declarative source code. First we
need access to the QDeclarativeEngines QScriptEngine. This access is
necessary to create QScriptValues via QScripEngine::newFunction. We use
this to make it possible to call Python methods and functions from QML /
ECMA-Script (via a C++-wrapper function). 
Second, we need access to the QDeclarativeOpenMetaObject to build a
dynamic ProxyObject, which represents Python objects in QML.  

Our current solution is to add a proxy-object implementation and a
header-file (files are attached) to the declarative source and build our
"own" version off Qt-Declarative. Of course, we would be very happy if
we could skip this workaround. Is there any chance that:
1. QDeclarativeEngine allows access to its QScriptEngine
2. QDeclarativeOpenMetaObject will become part of the Public API
in the near future? 

It's unfortunate that we've missed the 4.7 release with that, but it
would be nice if we could integrate those hooks.

What do you think? 


Greetings from Berlin
Georg & Kristian
-- 
mixd.tv - mix your own tv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proxyproperty.cpp
Type: text/x-c++src
Size: 2539 bytes
Desc: not available
Url : http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100923/44525066/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proxyproperty.h
Type: text/x-chdr
Size: 1730 bytes
Desc: not available
Url : http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100923/44525066/attachment-0001.bin 


More information about the Qt-qml mailing list