[Development] why is QJSEngine not modifying metaObject

Hausmann Simon Simon.Hausmann at theqtcompany.com
Wed Feb 11 09:03:42 CET 2015


Kind of :) It works on a type level. So a new type is defined with new methods and a new meta object is defined. But it doesn't use a mechanism where a new meta object is created each time a method is added.

If we move the current engine over to generate meta objects from internal classes then perhaps we could create the meta objects on demand and batch them. That would make the example at hand work.

Of course this could also be implemented by brute force, but I'm not sure it is worth it.


  Original Message
From: Thiago Macieira
Sent: Wednesday, February 11, 2015 08:35
To: development at qt-project.org
Subject: Re: [Development] why is QJSEngine not modifying metaObject

On Wednesday 11 February 2015 07:11:26 Hausmann Simon wrote:
> Hi,
> The short answer to your question is that the meta object system isn't
> really designed for this. In theory this could be implemented but it would
> come at a high cost for something that rarely happens. The qml engine
> supports this, but in qml this happens at type compilation time, not fully
> dynamic.

Wasn't this how QML1 worked?
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Development mailing list
Development at qt-project.org

More information about the Development mailing list