[Qt-qml] How to edit and continue?
aaron.kennedy at nokia.com
aaron.kennedy at nokia.com
Sat May 28 03:44:36 CEST 2011
Hi,
On 28/05/2011, at 5:16 AM, "ext mathias.malmqvist at nokia.com" <mathias.malmqvist at nokia.com> wrote:
>
> Hi,
>
> Anyone know if there's any way to make the QML engine properly reload
> and recompile a qml file that has already been loaded and used before?
>
> I.e. while developing I want to be able to edit a qml file and have the change
> show up on the screen without restarting the qml application, because
> restarting it takes quite a while.
>
> I tried using a Loader to load the root element that contains the elements I
> want to be able to edit, but the compiled qml code must be cached even
> after the element has been unloaded by the Loader 'cause the changes I
> make are not picked up until I restart the whole thing. Can I turn off the
> caching or explicitly purge it?
Not easily. From c++ you can call QDeclarativeEngine::clearComponentCache(), but there is no way from QML (short of manually exposing this method, of course). For Qt 5 we intend to make this easier, at least while in development mode.
Cheers,
Aaron
>
>
> Cheers
> Mathias
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list