From a90eff10c9f36256281fecad95bbfbfe77a13acd Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 12 Aug 2022 10:58:21 +0200 Subject: [PATCH] Fixed crash when using Qt6 with MSVC --- examples/full_features/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/full_features/main.cpp b/examples/full_features/main.cpp index 2780b17..b82f985 100644 --- a/examples/full_features/main.cpp +++ b/examples/full_features/main.cpp @@ -1,10 +1,14 @@ #include +#include #include "mainwindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL); +#endif CMainWindow w; w.show(); return a.exec();