[Qt-qml] QML dynamic loading a memory string?
martin.jones at nokia.com
martin.jones at nokia.com
Thu Nov 25 00:01:57 CET 2010
Unfortunately there is no easy way to add setData() to QDeclarativeView. You'll probably have to make your own QGraphicsView subclass, since QDeclarativeViewPrivate is not exported.
You can create an object from a QML string using Qt.createQmlObject(string qml, object parent, string filepath)
http://doc.qt.nokia.com/4.7-snapshot/qml-qt.html#dynamic-object-creation
Martin.
> -----Original Message-----
> From: qt-qml-bounces at trolltech.com [mailto:qt-qml-bounces at trolltech.com] On
> Behalf Of ext Nathan
> Sent: Wednesday, 24 November 2010 12:59 AM
> To: qt-qml at trolltech.com
> Subject: [Qt-qml] QML dynamic loading a memory string?
>
>
> I'm very new to QT & QML, so I'm looking for some guidance...
>
> After hunting around; I figured out that you can use QDeclarativeComponent,
> setData to dynamically load a string qml data...
>
> So the first question -- Any way to make the QDeclarativeView use setData? The
> only way I can think of off the top of my head is to somehow make a decendant
> class of both he QDeclarativeView and the QDeclarativeViewPrivate somehow?
>
> In QML is there a way to use the loader or some other component or method to
> talk to the QDeclarativeComponent to be able to use setData? Or do I need to
> somehow add "setData" to the loader class, and if so how?
>
> Nathan
>
>
>
>
> _______________________________________________
> 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