[Qt-qml] private Q_INVOKABLE
Sven Anderson
Sven.Anderson at snom.com
Tue Dec 6 12:44:24 CET 2011
Hi Aaron,
thanks for the quick reply.
Am 06.12.2011 12:31, schrieb aaron.kennedy at nokia.com:
> On 06/12/2011, at 11:20 AM, ext Sven Anderson wrote:
>
>> I noticed, that Q_INVOCABLEs, that are declared as private, cannot be
>> called from QML/javascript, while protected and public ones can. But
>> even the private ones can be called by QMetaObject::invokeMethod().
>>
>> Can someone explain that?
>
> Yes. We chose not to allow invoking private methods because, well, they're private.
I see. But isn't that a inconsistency, since protected methods can still
be called from javascript, and even private ones can be called with
QMetaObject::invokeMethod()? Don't get me wrong, I don't want to be
pedantic and basically I'm happy with it. I'm just curious and want to
fully understand. :-)
Regards,
Sven
More information about the Qt-qml
mailing list