diff --git a/resources/resources.cpp b/resources/resources.cpp index ae41807..998292f 100644 --- a/resources/resources.cpp +++ b/resources/resources.cpp @@ -20,6 +20,11 @@ #include #endif +#ifdef Q_OS_WINDOWS +#include +#include +#endif + #include using namespace std; @@ -356,6 +361,14 @@ void setupCommonQtApplicationAttributes() } QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); #endif + + // always show error reporting UI for this process (applicable for interactive applications only) + // see https://learn.microsoft.com/en-us/windows/win32/api/werapi/nf-werapi-wersetflags +#ifdef Q_OS_WINDOWS + if (WerSetFlags(WER_FAULT_REPORTING_ALWAYS_SHOW_UI) != S_OK) { + std::cerr << "Unable to initialize error reporting.\n"; + } +#endif } /*!