Hi,

There is no way to call and overridden function in QML (we support overloaded 
functions, though).

Cheers,

Aaron

On 08/03/2011, at 12:49 PM, ext Gregory Schlomoff wrote:

It may work if you give an id to your Item in Item A:

<ItemA.qml>
Item {
  id: itemA
  ...
}

<ItemB.qml>

ItemA {
  functionc foo() {
    itemA.foo()
  }
}

Not tested, though...

On Mon, Mar 7, 2011 at 7:23 PM, Pelle Johnsen 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

Is there a way to call a base item's overridden function?

<ItemA.qml>

Item {
    function foo() {
        console.log("ItemA.foo");
    }
}

<ItemB.qml>

ItemA {
    function foo() {
        console.log("ItemB.foo");
        // how to call ItemA.foo from here?
        ItemA.foo(); // gives error: unknown var ItemA
    }
}

Thanks in advance,

 -Pelle

_______________________________________________
Qt-qml mailing list
[email protected]<mailto:[email protected]>
http://lists.qt.nokia.com/mailman/listinfo/qt-qml


_______________________________________________
Qt-qml mailing list
[email protected]<mailto:[email protected]>
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

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

Reply via email to