Greetings,
I've got a Qt application that cross-compiles windows and linux (and android sans ArcGIS) that is pure c++ (no QML). I currently use MapGraphicsView but when trying to compile to android I trigger the error in the class header:
#ifndef GRAPHICSVIEW_SUPPORTED
#error "MapGraphicsView is not supported on this platform."
#endif
The Qt Android samples all use MapQuickView - but is there a known way to circumvent QtQuick for ArcGIS on Android?
Solved! Go to Solution.
@TomNorby I will discuss it with the team and see if this is something we can add support for. You are right, we'd need to add that support in our build in order to enable it; it's not just a matter of removing the ifdefs.
May I ask, what is your use case for needing Widgets support on mobile platforms? That is not a pattern that's been widely adopted or promoted by The Qt Company.
Hi @TomNorby . We don't support the MapGraphicsView (QWidget-based view) on the mobile platforms.
If you want a truly cross-platform experience I would recommend you use our MapQuickView class and follow the pattern used by our samples as you pointed out.
>but is there a known way to circumvent QtQuick for ArcGIS on Android?
Unfortunately no.
@JamesBallard1, do you happen to know if support for pseudo-pure c++ will become available in the future. I may be naïve, but it seems that these classes would merely need to be defined in the library.
When running make I'm just running into the linker errors (as expected):
ld: error: undefined symbol: Esri::ArcGISRuntime::MapGraphicsView::<method()>
I imagine not officially supporting specific classes on Android but allowing the developers to #define GRAPHICSVIEW_SUPPORTED prior to including the respective header would be sufficient.
Anyhow, great product and many thanks!
@TomNorby I will discuss it with the team and see if this is something we can add support for. You are right, we'd need to add that support in our build in order to enable it; it's not just a matter of removing the ifdefs.
May I ask, what is your use case for needing Widgets support on mobile platforms? That is not a pattern that's been widely adopted or promoted by The Qt Company.
@JamesBallard1, currently I'm working for Oak Ridge National Laboratory, we have many projects that are interconnected and use TriBITS and CMake for package management and configuration. We've avoided .pro, .qml, and qmake. I'm not sure of the history, whether it's for our CI, static analysis tools, security scans, legacy developer preference, or something else entirely.
I've updated a widget from QMapControl (because ArcGIS is superior) last year and everything's been great for Windows and Linux. Now we're interested in Android, and used https://github.com/LaurentGomila/qt-android-cmake with minor tweaks to easily generate our APKs.
I hope it's not much of a lift, and appreciate your consideration even if the request won't be accommodated.
Much appreciated,
Tom
Thanks for the info, Tom. I will add this into our tracking issue.
We had a recent meeting with the Qt Company and they confirmed my previous recollection that Widgets, while technically supported on mobile, is not the recommended workflow. Qt Quick is. The main issue is the look-and-feel and styling options for Widgets on mobile.
As such, we will not pursue supporting Widgets on mobile platforms for the ArcGIS Runtime SDK for Qt.
I do hope you're still able to make the Runtime work in your project.