diff --git a/src/wizard/native/index.md b/src/wizard/native/index.md index e53466ed639e4a..46e042585050b3 100644 --- a/src/wizard/native/index.md +++ b/src/wizard/native/index.md @@ -38,3 +38,7 @@ sentry_capture_event(sentry_value_new_message_event( /* message */ "It works!" )); ``` + +If you're new to Sentry, use the email alert to access your account and complete a product tour. + +If you're an existing user and have disabled alerts, you won't receive this email. diff --git a/src/wizard/native/qt.md b/src/wizard/native/qt.md new file mode 100644 index 00000000000000..4c0b65f5246066 --- /dev/null +++ b/src/wizard/native/qt.md @@ -0,0 +1,47 @@ +--- +name: Qt +doc_link: https://docs.sentry.io/platforms/native/guides/qt/ +support_level: production +type: framework +--- + +Install the SDK by downloading the [latest release](https://github.com/getsentry/sentry-native/releases). Next, follow the +instructions in the [_Native SDK Documentation_](/platforms/native/guides/qt/) to build the SDK library. + +Import and initialize the Sentry SDK early in your application setup: + +```cpp +#include +#include + +int main(int argc, char *argv[]) +{ + sentry_options_t *options = sentry_options_new(); + sentry_options_set_dsn(options, "___PUBLIC_DSN___"); + sentry_init(options); + + // Make sure everything flushes + auto sentryShutdown = qScopeGuard([] { sentry_shutdown(); }); + + QApplication app(argc, argv); + /* ... */ + return app.exec(); +} +``` + +Alternatively, the DSN can be passed as `SENTRY_DSN` environment variable during +runtime. This can be especially useful for server applications. + +The quickest way to verify Sentry in your Qt application is by capturing a message: + +```c +sentry_capture_event(sentry_value_new_message_event( + /* level */ SENTRY_LEVEL_INFO, + /* logger */ "custom", + /* message */ "It works!" +)); +``` + +If you're new to Sentry, use the email alert to access your account and complete a product tour. + +If you're an existing user and have disabled alerts, you won't receive this email.