The documentation says "functor or lambda" so it depends a bit if you have C++11 available for lambda.
runJavaScript
(script,
[] (const QVariant &result
) {// your callback code
});
runJavaScript(script, [] (const QVariant &result) {
// your callback code
});
To copy to clipboard, switch view to plain text mode
As a functor
struct ScriptCallback
{
void operator
()(const QVariant &result
) { // your callback code
}
};
runJavaScript(script, ScriptCallback());
struct ScriptCallback
{
void operator()(const QVariant &result) {
// your callback code
}
};
runJavaScript(script, ScriptCallback());
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks