I want to do something like
if(x == 0){
quit() ;
}
is there a way to do this in a Qt Script?
I want to do something like
if(x == 0){
quit() ;
}
is there a way to do this in a Qt Script?
Enclose your code inside a function like this:
function main(){
// the code before
if(x == 0){
return;
}
// the code if condition not met
}
So you can exit javascript the code using the return statement. Make sure the main function is the only one called in your action (so it really quits from JS).