I've had similar problem and did not find a solution at the time.
While getMyself() feels hackish, it does indeed work. Thanks a lot for
sharing! :-)
On 20 June 2017 at 15:06, Ola Røer Thorsen wrote:
>
> 2017-06-20 13:52 GMT+02:00 Ola Røer Thorsen :
>
>
>> function doStuff() {
>>var o = the
2017-06-20 13:52 GMT+02:00 Ola Røer Thorsen :
> function doStuff() {
>var o = theGadget;
>console.log("o.name"); // prints "Name"
>o.name = "Some other name"; // No error, but nothing really happens
> either
>console.log("o.name"); // Still prints "Name" instead of "Some other
> n
Hi all,
I have a Q_GADGET-based class with properties that I instantiate in C++ and
expose to qml via QVariant in a list model. The class is registered to Qt
and Qml using Q_DECLARE_METATYPE,
qRegisterMetaType and qmlRegisterUncreatableType.
The properties are defined like this:
class MyGadget {