[Qt-interest] Throwing C++ exception from a wrapped Qobject in QScript
Liebe Markus (RtP2/TEF72)
Markus.Liebe at de.bosch.com
Wed Feb 17 15:31:11 CET 2010
Hi Oliver,
> I am not an expert with exception in C++, but I know that one
> has to enable exception support with a compiler flag. If I am
> not mistaken you can enable exception support in a
> platform-independent manner like this:
>
> // in your *.pro file
> CONFIG += exceptions
Thanks for the hint. In my case the exceptions have already been turned on.
So that was not the problem here.
I found a solution for myself. I am using QScriptContext::throwError() now and use the try{}catch(){} functionality of QtScript directly in the script.
This seems to be the cleaner way to do the errorhandling there =)
Regards,
Markus
More information about the Qt-interest-old
mailing list