dmendizabal
9th February 2012, 02:56
I need to expose a (slot) function from C++ into QML with parameters as reference to be used on the QML side:
C++ side
class A : public QObject
{
public slot:
void func(int& i, QString& s);
}
QML side
onClicked: {
objectA.func(i,s)
..do something with i
..do something with s
}
When I run the application, I receive an error message saying that javascript doesn't recognise i and s parameters. Any idea?
C++ side
class A : public QObject
{
public slot:
void func(int& i, QString& s);
}
QML side
onClicked: {
objectA.func(i,s)
..do something with i
..do something with s
}
When I run the application, I receive an error message saying that javascript doesn't recognise i and s parameters. Any idea?