[Qt-qml] Qml Object static function

bea.lam at nokia.com bea.lam at nokia.com
Wed Dec 7 00:55:40 CET 2011


On 06/12/2011, at 3:39 AM, ext 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)


If you don't want a custom QML type to be instantiable, you can register it using the overloaded version of  qmlRegisterType() that doesn't take any arguments

See the discussion at http://lists.qt.nokia.com/pipermail/qt-qml/2010-October/001470.html


cheers,

Bea



More information about the Qt-qml mailing list