[Qt-qml] Qml Object static function

Artem Marchenko artem.marchenko at gmail.com
Mon Dec 5 22:32:44 CET 2011


Hi Jesus

I don't think there is a natural way to do so as QML is supposed to be declarative primarily.

You can, however, achieve the nearly same results by putting your factory functions to JavaScript of either a parent QML object or JavaScript library.

Cheers,
Artem.

On 5.12.2011, at 19.39, Jesus Fernandez wrote:

> Hi,
> 
> Is there a way to have a Qml object with a function that doesn't require the object instantiation?
> I want to create a Qml object with a show function to create Object dynamicly. The function behaviour will be like a object factory (Static class function)
> 
> Best regards.
> _______________________________________________
> 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