handling return parameter for a cpp method /slot in QML
Unsolved
General and Desktop
-
onClicked:{
data = cpp_cmd.cmd_do(cmdline_txt_id.text); console.log(data); }
I have a slot called cpp_cmd.cmd_do() which is called when a button is pressed.
that cpp slot has a return paramter a string. (which contains json data) .return type of data is QString.
i am not able to display it and it gives an error. how would one solve this.
I need to futher process data or rather send it to another cpp function for further processing.
-
Hi,
What exact error do you get ?
Usually slots don't have return values. Q_INVOKABLE is used for that kind of method.