diff --git a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GORenderers/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GORenderers/main.cpp index 3e5fcb7a63..f7347c2a88 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GORenderers/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GORenderers/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GOSymbols/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GOSymbols/main.cpp index 0d1f04c719..e83daa0e81 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GOSymbols/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GOSymbols/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GraphicsOverlayDictionaryRenderer/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GraphicsOverlayDictionaryRenderer/main.cpp index e384bf494b..b1bdcab552 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GraphicsOverlayDictionaryRenderer/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GraphicsOverlayDictionaryRenderer/main.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -28,6 +29,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GraphicsOverlayDictionaryRenderer_3D/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GraphicsOverlayDictionaryRenderer_3D/main.cpp index 955d03778f..8c1e9866be 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GraphicsOverlayDictionaryRenderer_3D/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/GraphicsOverlayDictionaryRenderer_3D/main.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -28,6 +29,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/IdentifyGraphics/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/IdentifyGraphics/main.cpp index 9e6c537c4a..09cde7d2b7 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/IdentifyGraphics/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/IdentifyGraphics/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/ShowLegend/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/ShowLegend/main.cpp index 9e9ad3ce77..9f7e49b6b0 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/ShowLegend/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/ShowLegend/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -31,6 +32,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/EditData/AddFeaturesFeatureService/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/EditData/AddFeaturesFeatureService/main.cpp index a209d60fdb..c1bdb3ae32 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/EditData/AddFeaturesFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/EditData/AddFeaturesFeatureService/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/EditData/DeleteFeaturesFeatureService/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/EditData/DeleteFeaturesFeatureService/main.cpp index df48e71c60..57bffc7aa0 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/EditData/DeleteFeaturesFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/EditData/DeleteFeaturesFeatureService/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/EditData/EditFeatureAttachments/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/EditData/EditFeatureAttachments/main.cpp index 32b7378e9b..5a1aabe216 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/EditData/EditFeatureAttachments/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/EditData/EditFeatureAttachments/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -31,6 +32,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/EditData/UpdateAttributesFeatureService/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/EditData/UpdateAttributesFeatureService/main.cpp index 15225fbd2a..ff4c9e4584 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/EditData/UpdateAttributesFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/EditData/UpdateAttributesFeatureService/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/EditData/UpdateGeometryFeatureService/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/EditData/UpdateGeometryFeatureService/main.cpp index 5149fef54f..52200807d6 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/EditData/UpdateGeometryFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/EditData/UpdateGeometryFeatureService/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerChangeRenderer/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerChangeRenderer/main.cpp index d5752ed9b0..11998bdbdb 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerChangeRenderer/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerChangeRenderer/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerDefinitionExpression/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerDefinitionExpression/main.cpp index 70bcbb509b..48b8312662 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerDefinitionExpression/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerDefinitionExpression/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerDictionaryRenderer/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerDictionaryRenderer/main.cpp index a0b26602ac..1fa58a7032 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerDictionaryRenderer/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerDictionaryRenderer/main.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -28,6 +29,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerFeatureService/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerFeatureService/main.cpp index 43b4065a3b..d2bbbf420d 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerFeatureService/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerGeodatabase/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerGeodatabase/main.cpp index 241c2f1437..c52a8aff8e 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerGeodatabase/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerGeodatabase/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerQuery/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerQuery/main.cpp index 80634720ab..eb64b2e8c1 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerQuery/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerQuery/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerSelection/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerSelection/main.cpp index fd6be500f6..34a8361d8f 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerSelection/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/FeatureLayerSelection/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -31,6 +32,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/GenerateGeodatabase/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/GenerateGeodatabase/main.cpp index e617ea1b63..dd62c9f210 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/GenerateGeodatabase/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/GenerateGeodatabase/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableCache/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableCache/main.cpp index a43aeddb97..87247f803e 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableCache/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableCache/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableManualCache/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableManualCache/main.cpp index 369e3b506f..5468dee6d6 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableManualCache/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableManualCache/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableNoCache/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableNoCache/main.cpp index f90d9b1ff3..1fa0b93366 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableNoCache/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Features/ServiceFeatureTableNoCache/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Layers/ArcGISMapImageLayerUrl/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Layers/ArcGISMapImageLayerUrl/main.cpp index 3c4aa55e3b..24161ae057 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Layers/ArcGISMapImageLayerUrl/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Layers/ArcGISMapImageLayerUrl/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Layers/ArcGISTiledLayerUrl/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Layers/ArcGISTiledLayerUrl/main.cpp index 0d8213c2c9..a9ff9b8d63 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Layers/ArcGISTiledLayerUrl/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Layers/ArcGISTiledLayerUrl/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Layers/ChangeSublayerVisibility/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Layers/ChangeSublayerVisibility/main.cpp index 81b0324ece..a61d797e35 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Layers/ChangeSublayerVisibility/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Layers/ChangeSublayerVisibility/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -31,6 +32,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles/main.cpp index f6cc5081ec..6ba2333239 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Layers/ExportTiles/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Layers/VectorTiledLayerUrl/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Layers/VectorTiledLayerUrl/main.cpp index c34508a0de..8c9240e0a0 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Layers/VectorTiledLayerUrl/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Layers/VectorTiledLayerUrl/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ChangeBasemap/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/ChangeBasemap/main.cpp index e9f60a2926..f399b004a3 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/ChangeBasemap/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ChangeBasemap/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ChangeViewpoint/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/ChangeViewpoint/main.cpp index e93eabc072..63f854cfce 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/ChangeViewpoint/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ChangeViewpoint/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/DisplayDeviceLocation/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/DisplayDeviceLocation/main.cpp index af6c8c98af..246c24c316 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/DisplayDeviceLocation/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/DisplayDeviceLocation/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/DisplayMap/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/DisplayMap/main.cpp index 417922bc57..8a265b7a29 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/DisplayMap/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/DisplayMap/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ManageBookmarks/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/ManageBookmarks/main.cpp index caaa4037fb..c57d58fe56 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/ManageBookmarks/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ManageBookmarks/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/MapLoaded/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/MapLoaded/main.cpp index 4babf57bd4..9469104a75 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/MapLoaded/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/MapLoaded/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/MapRotation/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/MapRotation/main.cpp index b4e222448a..898844b923 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/MapRotation/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/MapRotation/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/OpenExistingMap/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/OpenExistingMap/main.cpp index 32f668389b..27984efae2 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/OpenExistingMap/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/OpenExistingMap/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/OpenMobileMap_MapPackage/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/OpenMobileMap_MapPackage/main.cpp index fcf2f3d9b6..502e27148b 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/OpenMobileMap_MapPackage/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/OpenMobileMap_MapPackage/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapArea/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapArea/main.cpp index 010299107d..432562148c 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapArea/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapArea/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapLocation/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapLocation/main.cpp index af84c5249c..b458e5288d 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapLocation/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapLocation/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/SetMapSpatialReference/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/SetMapSpatialReference/main.cpp index 26beb17109..fca8641305 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/SetMapSpatialReference/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/SetMapSpatialReference/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ShowMagnifier/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/ShowMagnifier/main.cpp index 20dab56508..326cf04b4e 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Maps/ShowMagnifier/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ShowMagnifier/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/RoutingAndNavigation/FindRoute/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/RoutingAndNavigation/FindRoute/main.cpp index 19b4c3a62c..dc78ef2516 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/RoutingAndNavigation/FindRoute/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/RoutingAndNavigation/FindRoute/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -31,6 +32,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Scene/BasicSceneView/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Scene/BasicSceneView/main.cpp index fc543f1530..d64083db3e 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Scene/BasicSceneView/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Scene/BasicSceneView/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Search/FindAddress/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Search/FindAddress/main.cpp index cc84e9fdbf..4761cd0bc0 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Search/FindAddress/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Search/FindAddress/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -30,6 +31,17 @@ using namespace Esri::ArcGISRuntime; int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples/Search/SearchSymbolDictionary/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Search/SearchSymbolDictionary/main.cpp index dae56569f4..54aacd5364 100644 --- a/ArcGISRuntimeSDKQt_CppSamples/Search/SearchSymbolDictionary/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples/Search/SearchSymbolDictionary/main.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include @@ -26,6 +27,17 @@ int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/DisplayInformation/GORenderers/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/DisplayInformation/GORenderers/main.cpp index a1fd4e38ee..15ec1c16ff 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/DisplayInformation/GORenderers/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/DisplayInformation/GORenderers/main.cpp @@ -14,9 +14,21 @@ #include "GoRenderers.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/DisplayInformation/GOSymbols/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/DisplayInformation/GOSymbols/main.cpp index 4176f0c7ee..9fe759bc51 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/DisplayInformation/GOSymbols/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/DisplayInformation/GOSymbols/main.cpp @@ -14,9 +14,21 @@ #include "GoSymbols.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Layers/ArcGISTiledLayerUrl/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Layers/ArcGISTiledLayerUrl/main.cpp index b3ef63d0c9..296e96d7f7 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Layers/ArcGISTiledLayerUrl/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Layers/ArcGISTiledLayerUrl/main.cpp @@ -14,9 +14,21 @@ #include "ArcGISTiledLayerUrl.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ChangeBasemap/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ChangeBasemap/main.cpp index 634a4fd319..36d8c83a04 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ChangeBasemap/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ChangeBasemap/main.cpp @@ -14,9 +14,21 @@ #include "ChangeBasemap.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ChangeViewpoint/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ChangeViewpoint/main.cpp index ed1b69792c..a3afc4284a 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ChangeViewpoint/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ChangeViewpoint/main.cpp @@ -14,9 +14,21 @@ #include "ChangeViewpoint.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/DisplayMap/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/DisplayMap/main.cpp index b890ffa809..4211319eef 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/DisplayMap/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/DisplayMap/main.cpp @@ -14,9 +14,21 @@ #include "DisplayMap.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ManageBookmarks/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ManageBookmarks/main.cpp index 0ed92cd2c3..24b3a4e11f 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ManageBookmarks/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/ManageBookmarks/main.cpp @@ -14,9 +14,21 @@ #include "ManageBookmarks.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/MapLoaded/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/MapLoaded/main.cpp index 593b884ba0..d244422b2b 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/MapLoaded/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/MapLoaded/main.cpp @@ -14,9 +14,21 @@ #include "MapLoaded.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/MapRotation/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/MapRotation/main.cpp index 5ff233dadd..69e362ef1e 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/MapRotation/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/MapRotation/main.cpp @@ -14,9 +14,21 @@ #include "MapRotation.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/OpenExistingMap/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/OpenExistingMap/main.cpp index 0cbedfd8c9..6d1ea06db5 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/OpenExistingMap/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/OpenExistingMap/main.cpp @@ -14,9 +14,21 @@ #include "OpenExistingMap.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetInitialMapArea/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetInitialMapArea/main.cpp index dbcad52986..d8e0c320d4 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetInitialMapArea/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetInitialMapArea/main.cpp @@ -14,9 +14,21 @@ #include "SetInitialMapArea.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetInitialMapLocation/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetInitialMapLocation/main.cpp index dc4eeed46e..eeb0e0f4dd 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetInitialMapLocation/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetInitialMapLocation/main.cpp @@ -14,9 +14,21 @@ #include "SetInitialMapLocation.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetMapSpatialReference/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetMapSpatialReference/main.cpp index 6c1b0f6efe..f45c9633ff 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetMapSpatialReference/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Maps/SetMapSpatialReference/main.cpp @@ -14,9 +14,21 @@ #include "SetMapSpatialReference.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Scenes/BasicSceneView/main.cpp b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Scenes/BasicSceneView/main.cpp index cd37e205cf..21eabb551d 100644 --- a/ArcGISRuntimeSDKQt_CppSamples_Widgets/Scenes/BasicSceneView/main.cpp +++ b/ArcGISRuntimeSDKQt_CppSamples_Widgets/Scenes/BasicSceneView/main.cpp @@ -14,9 +14,21 @@ #include "BasicSceneView.h" #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QApplication application(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GORenderers/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GORenderers/main.cpp index 93e8f14c78..f36d3faf5f 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GORenderers/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GORenderers/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GOSymbols/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GOSymbols/main.cpp index d914e35a56..d210ec7fdd 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GOSymbols/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GOSymbols/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GraphicsOverlay_DictionaryRenderer/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GraphicsOverlay_DictionaryRenderer/main.cpp index 9d93ce7449..819b81530e 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GraphicsOverlay_DictionaryRenderer/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GraphicsOverlay_DictionaryRenderer/main.cpp @@ -15,9 +15,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GraphicsOverlay_DictionaryRenderer_3D/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GraphicsOverlay_DictionaryRenderer_3D/main.cpp index 23b8ffd323..0e9fa71bd8 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GraphicsOverlay_DictionaryRenderer_3D/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/GraphicsOverlay_DictionaryRenderer_3D/main.cpp @@ -15,9 +15,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/IdentifyGraphics/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/IdentifyGraphics/main.cpp index 8d81e8c56e..19378bf7fb 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/IdentifyGraphics/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/IdentifyGraphics/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/ShowLegend/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/ShowLegend/main.cpp index 4183b08ad8..91067582cf 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/ShowLegend/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/DisplayInformation/ShowLegend/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/EditData/AddFeaturesFeatureService/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/EditData/AddFeaturesFeatureService/main.cpp index 3dae9b0a16..7eb78177ad 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/EditData/AddFeaturesFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/EditData/AddFeaturesFeatureService/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/EditData/DeleteFeaturesFeatureService/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/EditData/DeleteFeaturesFeatureService/main.cpp index e23143bc47..799215b5f6 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/EditData/DeleteFeaturesFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/EditData/DeleteFeaturesFeatureService/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/EditData/EditFeatureAttachments/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/EditData/EditFeatureAttachments/main.cpp index 58d176e9ca..f57bcd0dd7 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/EditData/EditFeatureAttachments/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/EditData/EditFeatureAttachments/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/EditData/UpdateAttributesFeatureService/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/EditData/UpdateAttributesFeatureService/main.cpp index 4935e405f0..d7967c30b4 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/EditData/UpdateAttributesFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/EditData/UpdateAttributesFeatureService/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/EditData/UpdateGeometryFeatureService/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/EditData/UpdateGeometryFeatureService/main.cpp index b9cf20d840..9ba9b694ad 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/EditData/UpdateGeometryFeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/EditData/UpdateGeometryFeatureService/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_ChangeRenderer/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_ChangeRenderer/main.cpp index d9b0623c04..a8784a9e4e 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_ChangeRenderer/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_ChangeRenderer/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_DefinitionExpression/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_DefinitionExpression/main.cpp index 4ec342e212..239e00837b 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_DefinitionExpression/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_DefinitionExpression/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_DictionaryRenderer/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_DictionaryRenderer/main.cpp index 88cd7dce23..7735de8e60 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_DictionaryRenderer/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_DictionaryRenderer/main.cpp @@ -15,9 +15,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_FeatureService/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_FeatureService/main.cpp index a410cc312a..5c2ac1b9cc 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_FeatureService/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_FeatureService/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Geodatabase/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Geodatabase/main.cpp index 462fe253c1..374c5259e9 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Geodatabase/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Geodatabase/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Query/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Query/main.cpp index 4e441123b3..46dd2537eb 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Query/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Query/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Selection/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Selection/main.cpp index 5bd9f29661..309d6acc57 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Selection/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/FeatureLayer_Selection/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/GenerateGeodatabase/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/GenerateGeodatabase/main.cpp index e61e98326b..43a99c1af0 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/GenerateGeodatabase/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/GenerateGeodatabase/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_Cache/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_Cache/main.cpp index 898fe8315a..a3e9e075e8 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_Cache/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_Cache/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_ManualCache/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_ManualCache/main.cpp index 6a83a95bf2..3ba59d43b7 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_ManualCache/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_ManualCache/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_NoCache/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_NoCache/main.cpp index 34fa651ecc..90c9fc3db2 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_NoCache/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Features/ServiceFeatureTable_NoCache/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Layers/ArcGISMapImageLayerUrl/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Layers/ArcGISMapImageLayerUrl/main.cpp index 9cc3962971..e7215baf63 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Layers/ArcGISMapImageLayerUrl/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Layers/ArcGISMapImageLayerUrl/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Layers/ArcGISTiledLayerUrl/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Layers/ArcGISTiledLayerUrl/main.cpp index ec52033ff0..a6a318a077 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Layers/ArcGISTiledLayerUrl/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Layers/ArcGISTiledLayerUrl/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Layers/ChangeSublayerVisibility/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Layers/ChangeSublayerVisibility/main.cpp index 1d77c660d4..2e6fb90fbd 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Layers/ChangeSublayerVisibility/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Layers/ChangeSublayerVisibility/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Layers/ExportTiles/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Layers/ExportTiles/main.cpp index 1daba6a591..c1ef618816 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Layers/ExportTiles/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Layers/ExportTiles/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Layers/VectorTiledLayerUrl/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Layers/VectorTiledLayerUrl/main.cpp index 2fece5893a..48b462831f 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Layers/VectorTiledLayerUrl/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Layers/VectorTiledLayerUrl/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/ChangeBasemap/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/ChangeBasemap/main.cpp index 8d72c8be45..6b826fa7d3 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/ChangeBasemap/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/ChangeBasemap/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/ChangeViewpoint/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/ChangeViewpoint/main.cpp index e7a7339e2e..fcb9f7bb4b 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/ChangeViewpoint/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/ChangeViewpoint/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayDeviceLocation/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayDeviceLocation/main.cpp index c0374e0594..e8c46b403d 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayDeviceLocation/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayDeviceLocation/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayMap/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayMap/main.cpp index 92c1e90677..59cbcb4233 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayMap/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/DisplayMap/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/ManageBookmarks/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/ManageBookmarks/main.cpp index 0053ca120c..5cae88bdea 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/ManageBookmarks/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/ManageBookmarks/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/MapLoaded/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/MapLoaded/main.cpp index 9b371c3fc8..2daf63583c 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/MapLoaded/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/MapLoaded/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/MapRotation/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/MapRotation/main.cpp index dd74a4dce9..836067ad51 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/MapRotation/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/MapRotation/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/OpenExistingMap/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/OpenExistingMap/main.cpp index 78b8b7486a..6e10e8423a 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/OpenExistingMap/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/OpenExistingMap/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/OpenMobileMap_MapPackage/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/OpenMobileMap_MapPackage/main.cpp index 909883de78..f78691bac1 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/OpenMobileMap_MapPackage/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/OpenMobileMap_MapPackage/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetInitialMapArea/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetInitialMapArea/main.cpp index aab76e6221..66f219b61f 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetInitialMapArea/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetInitialMapArea/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetInitialMapLocation/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetInitialMapLocation/main.cpp index 06f6b5896c..03e81e20dc 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetInitialMapLocation/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetInitialMapLocation/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetMapSpatialReference/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetMapSpatialReference/main.cpp index 730a6c93ec..0861e034b0 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetMapSpatialReference/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/SetMapSpatialReference/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Maps/ShowMagnifier/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Maps/ShowMagnifier/main.cpp index 9eda5c6d0f..e4baf3bc09 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Maps/ShowMagnifier/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Maps/ShowMagnifier/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/RoutingAndNavigation/FindRoute/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/RoutingAndNavigation/FindRoute/main.cpp index 604a3924d3..ae5a7b229e 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/RoutingAndNavigation/FindRoute/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/RoutingAndNavigation/FindRoute/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Scene/BasicSceneView/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Scene/BasicSceneView/main.cpp index 156bd66ce1..814a974ebd 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Scene/BasicSceneView/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Scene/BasicSceneView/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/ArcGISRuntimeSDKQt_QMLSamples/Search/FindAddress/main.cpp b/ArcGISRuntimeSDKQt_QMLSamples/Search/FindAddress/main.cpp index 89fb95d09e..6967a40a67 100644 --- a/ArcGISRuntimeSDKQt_QMLSamples/Search/FindAddress/main.cpp +++ b/ArcGISRuntimeSDKQt_QMLSamples/Search/FindAddress/main.cpp @@ -17,9 +17,21 @@ #include #include #include +#include int main(int argc, char *argv[]) { +#if defined(Q_OS_WIN) + if (QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR > 6) + { + // Workaround for Qt versions greater than 5.6 + // Force to OpenGL ES 3 + QSurfaceFormat fmt = QSurfaceFormat::defaultFormat(); + fmt.setVersion(3, 0); + QSurfaceFormat::setDefaultFormat(fmt); + } +#endif + QGuiApplication app(argc, argv); #ifdef Q_OS_WIN