Hi,
For reference, this issue is logged as 
https://bugreports.qt-project.org/browse/QTBUG-25942.

Regards,Michael

> From: wolfgang.ba...@gmx.net
> To: interest@qt-project.org
> Date: Thu, 22 May 2014 11:42:07 +0200
> Subject: [Interest] QML function super call
> 
> How can I call the function implementation in a base class, if the class 
> overrides the definition? Here is an example:
> 
> 
> Base.qml:
> -------------------
> import QtQuick 2.2
> 
> Item {
> function myFunc() {
> console.log( "Base myFunc called" );
> }
> }
> -------------------
> 
> 
> Derived.qml:
> -------------------
> import QtQuick 2.2
> 
> Base {
> function myFunc() {
> console.log( "Derived myFunc called" );
> // the following line does not work. How to call myFunc in Base?
> Base.myFunc();
> }
> }
> -------------------
> 
> 
> Without the Base.myFunc(), code like this works, thus you can ovveride 
> function implementations. However, calling the baseclass's implementation is 
> often very important. I have not found any mentioning of this in the 
> documentation, but maybe I have just not found it. Any ideas?
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
                                          
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to