Hi Eduardo!

On 10/6/2010 11:25 AM, Eduardo Fleury wrote:
Hi there!

On Wed, Oct 6, 2010 at 6:01 AM, Raymond de Vries <[email protected] <mailto:[email protected]>> wrote:

    I have been creating applications with the C++ API and have some
    custom
    widgets, e.g. for OpenGL rendering. Now I would like to use these
    widgets in my QML based UI application.


Which kind of widgets are these? QGraphicsWidgets? QWidgets?

QML scene is a QGraphicsItem scene, so you are able to add QGraphicsWidgets to it. I'm not much into that but my understanding is that you must ensure your widgets have a default constructor (there's no way to give constructors parameters within QML) and then you must register your class (qmlRegisterType) so it is visible in QML.
That's interesting info. These are not derived from QGraphicsWidget since I used to add these to the QGraphicsScene with addWidget().

Would there be an example somewhere? It is also interesting to know how I can add these widgets to Creator, I assume with a dll.

There must be something about that in the docs, check for qmlRegisterType.
I am already trying to add DropShadow etc to my QML application and I need qmlRegisterType for that too, so it seems. No idea yet how to use that.

regards
Raymond


--
Eduardo M. Fleury
OpenBossa - INdT
http://eduardofleury.com/
http://www.openbossa.org/

_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to