Connecting C++ signal to QML function with arguments
Connecting a C++ signal to a QML function seems to work fine if the QML function has no arguments.
But if the QML function has an argument, how can I connect a signal to it? What is the type of the argument? QVariant?
name the parameters in your signal declaration, something like this
@void mySignal(int value);@
and you can get the parameter value by using that name. for example
Thanks. Problem is, I need to connect the signal to the QML function from C++, since I don't know the name of the signal/function to connect until runtime.