[Development] Question about Qt's future

Hartmann Thomas Thomas.Hartmann at digia.com
Mon Apr 28 11:32:12 CEST 2014


Hi,

yes, writting C++ inline in QML would be another "tooling nightmare". Also what is the problem with:

MouseArea {
    onClicked: companion.mouseAreaClicked();
}

If tooling creates the companion object for you (In a wizard) and code completion and code naviagtion (F2) works as expected?


Kind Regards,
Thomas Hartmann


________________________________________
From: Nils Jeisecke [njeisecke at saltation.de]
Sent: 28 April 2014 11:00
To: Hartmann Thomas
Cc: development at qt-project.org
Subject: Re: [Development] Question about Qt's future

Hi,

> Another idea is to allow C++ companion objects, that would
> take the place of any Java Script code for people who
> prefer C++. A companion object would be a QObject
> paired with the QML object, that has access to the
> QML context. The QObject would then define a couple
> of signals/slots that can be used from QML as
> Java Script is used today.
I really like this idea. Maybe one could even write C++ code
directly in the QML file and let a preprocessor generate
a proper C++ class containing this code. So, no more JavaScript,
data conversion and garbage collection. Or just another tooling
nightmare?

Nils



More information about the Development mailing list