[Interest] Awkward Javascript problem

Nuno Santos nunosantos at imaginando.pt
Thu Nov 30 11:11:27 CET 2017


Hi,

I usually register a controller property that points to a Controller classe when I start my Qt apps. I can then access the controller from any point of the code in Javascript:

quickView->rootContext()->setContextProperty("controller", &controller);

Curiously, I’m having an issue in which inside a MouseArea onClick event, controller is not defined:

ReferenceError: controller is not defined 

This MouseArea lives inside a Loader component that is one of the children of a SplitView. 

Maybe this be the cause for such ReferenceError? How can I workaround this? Any ideas?

Thanks!

Regards,

Nuno


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171130/a1f33f15/attachment.html>


More information about the Interest mailing list