Exception handling doesn't work with Qt on Windows

后端 未结 2 2161
青春惊慌失措
青春惊慌失措 2021-02-08 12:02

I\'m facing strange problem. Namely, Qt somehow turns off exception handling in my program. I can\'t catch any exception, and when I throw an exception application crashes.

2条回答
  •  天命终不由人
    2021-02-08 12:26

    It's no longer necessary to use the -exceptions flag with Qt. In Qt Creator 4 it's the default, and my Windows Qt app happily uses vast and extensive exception handling with no problems. Qt MSVC builds use the /EHsc compiler option, which turns normal exception handling on.

提交回复
热议问题