[Development] How to have equivalent of functions over-riding in Qml

2014-07-09 Thread travik
Hi, I would like to have equivalent of compile time polymorphism in in Qml. a.k.a function overriding. I know inheritance can be obtained by including the base-class in derived class. (A realisation of the principle called inheritance by composition) I also want to have some default implementati

Re: [Development] How to have equivalent of functions over-riding in Qml

2014-07-09 Thread Martin Leutelt
Hi, the problem is that your Derived.qml isn't actually derived from Base.qml, since you're using 'Item'instead of 'Base' as a root item. This will work: Base.qmlItem {function method1() {}} Derived.qmlBase {   id: base} SomeOtherQml.qml...Derived {   id: derived1}...Calling derived1.method1()

Re: [Development] How to have equivalent of functions over-riding in Qml

2014-07-09 Thread travik
Thanks for the very quick reply. Thank you for clarifying my understanding of correct derivation in Qml Regards, R.kiran ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development