[Qt-qml] Calling a base item's overridden function?
Gregory Schlomoff
gregory.schlomoff at gmail.com
Tue Mar 8 03:49:10 CET 2011
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 <pelle.johnsen at gmail.com>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
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110308/b97dd4de/attachment.html
More information about the Qt-qml
mailing list