[Qt-interest] Throwing C++ exception from a wrapped Qobject in QScript

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Feb 17 12:10:15 CET 2010


Liebe Markus (RtP2/TEF72) wrote on Wednesday, February 17, 2010 9:08 AM:


> Now I am wondering if it is only accidently that I can catch the
> exception on windows and the correct way to do sth. like this would
> be another one.  
> 
> Do you have any hints on how to do this right on both platforms?

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

Refer to http://qt.nokia.com/doc/4.6/qmake-variable-reference.html, chapter "CONFIG" (pretty much in the beginning).


Does that help?

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list