You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Monday, September 26th 2016, 11:43am

How to pass the javascript var from qml to CPP?

I want to pass the results which stored in javascript var from the main.qml to the writeXML.cpp.
I can see the count, the searchitems are fetched and want to write in XML format.
How can I achieve this.
Code snippet:
var varResultArray;
varResultArray = idPortalSearchItems.results[1];
How Can I pass it by Javascript var Ex:
objHomeController.eveWriteXMLFile(varResultArray ); //Passing an Js variable
What will be the datatype of the argument of the method?
Q_INVOKABLE bool eveWriteXMLFile(??????? varResultArray ); //What will be the datatype?
How to access the object varResultArray in cpp file?
Thanks In advance.