Hi,
I am developing an app.
Query:
How to pass the object from QML to CPP file, what will be object type in QT?
Code:
Login.QML
function metPassObject()
{
var myCar = new Object();
myCar.make = "Ford";
myCar.model = "Mustang"
myCar.year = 1969;
objQtCPPSearchVOne.metPassObject(myCar);
}
function metPassObject()
{
var myCar = new Object();
myCar.make = "Ford";
myCar.model = "Mustang"
myCar.year = 1969;
objQtCPPSearchVOne.metPassObject(myCar);
}
To copy to clipboard, switch view to plain text mode
.H file:
Q_INVOKABLE void metPassObject (type parameter)- what will be the parameter type?
Q_INVOKABLE void metPassObject (type parameter)- what will be the parameter type?
To copy to clipboard, switch view to plain text mode
.CPP file:
void metPassObject(type parameter)
{
//How to access the object?
}
void metPassObject(type parameter)
{
//How to access the object?
}
To copy to clipboard, switch view to plain text mode
Thanks is Advance.
Bookmarks