Script result to SDK how to (SOLVED)

hcsaba68hcsaba68 Posts: 11

Hi all,

How can I get the result of DzScript ?

QVariant result;QString str;DzScript *Script = new DzScript;Script->clear();Script->addLine("var oViewportMgr = MainWindow.getViewportMgr();");Script->addLine("var oViewport = oViewportMgr.getActiveViewport().get3DViewport();");Script->addLine("var oCamera = oViewport.getCamera();");Script->addLine("print(String(\"%1 : \").arg(oCamera.pixelsWidth));");//result=Script->result();result.setValue(Script->result());if (Script->execute() == true) { dzApp->statusLine("Script OK", FALSE); //str = result.toString();str = "Success";}else { dzApp->statusLine(Script->errorMessage(), FALSE);str = "Fail";}

I can get Success, but I can not convert to C++ value.

Thanks.

Post edited by hcsaba68 on

Comments

Sign In or Register to comment.