[Qt-qml] interfaces for QML Python Bindings
aaron.kennedy at nokia.com
aaron.kennedy at nokia.com
Fri Oct 1 07:51:03 CEST 2010
Hi,
On 24/09/2010, at 3:19 AM, ext Kristian Mueller wrote:
> 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?
Both of these APIs are internal because there are still some outstanding issues we have to resolve. If we just exposed the QScriptEngine directly it is currently way too easy for people to shoot themselves in the foot. We hope to resolve these problems and expose the QScriptEngine in the future - in my estimation we'll do this by 4.8 at the latest.
QDeclarativeOpenMetaObject has a horrible API. We would like to clean it up and expose that functionality, too. I'm not sure of your exact requirements, but could QDeclarativePropertyMap be used to accomplish what you want?
Cheers,
Aaron
> 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
> <proxyproperty.cpp><proxyproperty.h>_______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list