|
BLOG
|
Up until now, Qt ArcGIS Runtime developers could follow one of two paradigms - either write their apps in all C++ with Qt Widgets or all QML with Qt Quick. One of the new and exciting things about our newest release of ArcGIS Runtime 100.0 is that we now support a third paradigm - writing your frontend in QML and your backend in C++ using the Qt Quick framework. This is a great opportunity for C++ developers to embrace a more modern approach to the Qt framework, and to start leveraging some of the advantages that QML brings to the table as a UI language. Some of the main benefits you will see with using Qt Quick is that: You can easily seperate your business logic (C++) from your declarative UI (QML) This is supported on nearly every platform. When using the Qt Quick framework, our C++ API is now supported on all the same platforms as our QML API. QML supports touch interactions QML scales well between different platforms and form factors QML supports fluid animations and other similar features expected in modern user interfaces If you'd like to get started using this new paradigm, there are 3 main concepts to understand: registering C++ classes as QML types, creating C++ methods that can be called from QML, and creating QML properties. Registering C++ classes as QML types: In order to access a C++ class in QML, you must register it as a QML type. For example, one of the most common things you will want to do as an ArcGIS Runtime developer is declare a MapView in QML, but write the business logic for the MapView in C++. To do this, you will register the MapQuickView (a version of the MapView that inherits from QQuickItem) as a QML type somewhere in the main.cpp with the following syntax: qmlRegisterType<MapQuickView>("Esri.Samples", 1, 0, "MapView"); In this case, replace "Esri.Samples" with whatever you would like your namespace to be called, replace 1 and 0 with the major and minor version of your application, and optionally replace "MapView" with whatever you want to call the type in QML. Once you have done this, you can declare a MapView in QML by importing your new namespace, and declaring a MapView: import Esri.Samples 1.0
MapView {
anchors.fill: parent
objectName: "mapView"
} In this case, we gave the MapView an object name so that we could obtain it from the C++ side, and then add a Map into the MapView in C++. // find QML MapView component
m_mapView = findChild<MapQuickView*>("mapView");
// create a new basemap instance
Basemap* basemap = Basemap::imageryWithLabels(this);
// create a new map instance
m_map = new Map(basemap, this);
// set map on the map view
m_mapView->setMap(m_map); This full workflow can be found in the Display a Map sample. You would use the same workflow to create a 3D scene, and a similar workflow for any other QObject* type that you want to expose from C++ to QML. This is only a very basic example. More information on how this all works, along with additional parameters and workflows can be found in Qt's Documentation. Invoking C++ methods from QML Once you have your C++ classes exposed as QML types, the next logical step is to be able to call a method on that class from the QML side. For example, you may have a QML Slider control that you want to rotate the MapView whenever the Slider is moved. To do this, you simply need to add the Q_INVOKABLE macro to any of your method declarations that you want to be able to be called from QML: Q_INVOKABLE void setMapViewRotation(double degrees); Then, from QML, you would call the method with the following syntax: Slider {
onPressedChanged: {
// Call C++ invokable function to change the rotation of the map view
mapRotationSample.setMapViewRotation(value);
}
} This full workflow can be found in the Map Rotation sample. The section entitled "Exposing Methods (Including Qt Slots)" in this Qt documentation explains this in further detail. Creating bindable QML properties Once you begin using QML, you begin to realize that the true power in QML is not in calling functions whenever some signal emits, but rather in using property binding so that things are updated automatically without any imperative code needing to be written at all. This is true declarative code, and is the way QML was intended to be used. For example, if you are signing into your organizations portal, and you want to obtain several things about the user's login information to display on the screen, such as username, thumbnail, and email, you don't want to call a getter from the QML side every time. Instead, you want to simply create a property that you can bind onto, and whenever that property changes, all UI elements will automatically update with the new information. To do this, you must follow several steps. First, you must declare your property in the C++ header file with the Q_PROPERTY macro. This macro requires you give it a name, a type, a getter, an optional setter, and a signal. For example: Q_PROPERTY(QString username READ username NOTIFY usernameChanged) In this example, QString is the type, "username" is the name referenced from QML, "username" is the getter in C++, and "usernameChanged" is the signal. Next, you need to set up your declaration for the getter and signal: private:
QString username() const;
signals:
void usernameChanged(); The C++ implementation would look something like this: QString PortalUserInfo::username() const
{
if (m_user)
return m_user->username();
return "UNKNOWN";
} Whenever this value changes, you must emit the signal, which will trigger the Q_PROPERTY to update any other object that has bound to it: void PortalUserInfo::onPortalLoadStatusChanged(LoadStatus loadStatus)
{
if (loadStatus == LoadStatus::Loaded)
{
m_user = m_portal->portalUser();
emit usernameChanged(); // this will trigger all elements to update with the new value
}
} Finally, bind to the Q_PROPERTY in QML: Text {
text: username
} This full workflow can be found in the PortalUserInfo sample. Further details and options for specifying bindable properties with QML can be found in the Qt documentation. These are the basic things you will need to understand to get started with using the Qt Quick framework with C++ and QML. All of our samples on GitHub use this new paradigm, so I highly encourage you to check these out to get some ideas on how everything works. We also have a new template that is integrated into Qt Creator that will get you started with building Qt Quick C++/QML applications.
... View more
12-19-2016
01:57 PM
|
3
|
1
|
3898
|
|
POST
|
also, maybe you will find this web app helpful - Joint military symbology explorer
... View more
12-19-2016
07:53 AM
|
0
|
2
|
2692
|
|
POST
|
Here is the official MIL-STD-2525D documentation - http://www.dtic.mil/doctrine/doctrine/other/ms_2525d.pdf Note that 2525D symbols are made up of a combination of fields, versus one field (like 2525C and "sic" field). However, there is a "sidc" field in 2525D that can be used similarly to "sic" in 2525C.
... View more
12-19-2016
07:52 AM
|
0
|
3
|
2692
|
|
POST
|
Regarding BUG-000092678, you are correct- it is not yet fixed in the first release of Quartz (100.0), but we are still working on it. I realize it was confusing to close it before, so I have reopened it, and it should show up as open again instead of closed. This may take a bit to get updated on the public page. Regarding BUG-000092680, I tested with the original test data again, and I don't see the issue with version 100.0. Here is my code: // create graphic overlay
GraphicsOverlay* go = new GraphicsOverlay(this);
m_mapView->graphicsOverlays()->append(go);
// create simple marker graphic
Point p(0,0);
SimpleMarkerSymbol* ss = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle,QColor("yellow"),50,this);
Graphic* g = new Graphic(p, ss, this);
go->graphics()->append(g);
// create simple marker graphic
Point p2(0,0);
PictureMarkerSymbol* ps = new PictureMarkerSymbol(QImage("/Users/<username>/Desktop/PictureRotation/Arrow.png"),this);
ps->setHeight(50);
ps->setWidth(20);
ps->setOffsetY(-25);
Graphic* g2 = new Graphic(p2, ps, this);
go->graphics()->append(g2);
... View more
12-12-2016
01:45 PM
|
0
|
1
|
848
|
|
BLOG
|
Taner- You should be able to build for arm android on windows or unix systems. Either way, as this issue is with Qt itself, this would be a great question to post on the Qt Forums or to submit to the Qt Company support team. Thanks, Luke
... View more
12-12-2016
01:13 PM
|
0
|
0
|
1165
|
|
POST
|
If the app runs normally, then that would indicate to me that everything is copied where it is needed. The Post Installer should have copied everything from the SDK installation into your Qt kit. If you haven't already done so, close and restart Qt Creator. Perhaps you ran the post installer while it was open, and Qt Creator has not registered the new prf file? If that doesn't work, try running the post installer one more time, making sure to double check that you are running it against the kit you are currently building with.
... View more
12-09-2016
02:11 PM
|
0
|
4
|
1799
|
|
POST
|
"Quartz" was the codename for our 100.0 release. This is the new generation of Runtime SDKs from Esri. The 100.0 release does not yet have support for shapefiles. However, our 10.2.6 release does have a way you can view shapefiles - ArcGIS for Developers | ArcGIS for Developers In an upcoming update of Runtime 100, we will have native support for shapefiles and it will be very easy to read and query them.
... View more
12-09-2016
12:47 PM
|
0
|
0
|
1130
|
|
POST
|
Coordinate conversion is not available in the 100.0 release of ArcGIS Runtime. We plan on having it for an upcoming release. What are you trying to convert to/from right now?
... View more
12-06-2016
07:50 AM
|
0
|
5
|
2774
|
|
POST
|
The Field has a FieldType enumeration, which are things like Date, String, Int, etc. String should accept anything that is a QString, Date should accept anything that is a QDate, and so on. Eventually, we will have a fully functional Popup that will help streamline these editing workflows. We have the building pieces in all of the Popup* classes, but we do not yet have an associated view to go with it.
... View more
12-02-2016
08:27 AM
|
0
|
0
|
1392
|
|
POST
|
Where does MapView.identifyLayer get its FeatureTable instance? It's different than the one I created. This looks like a bug. We are creating a copy of the pointer behind the scenes. However, it is still completely safe to use, because it points to the same underlying table. Please submit a support ticket so that they can log a bug in the system for this. Can I update a feature in my own FeatureTable instance with the feature from MapView.identifyLayer? Yes, even though it is a copy, it points to the same underlying instance, so it is totally fine. Any other issues you see are either coding errors or different issues. Is there a way to get a feature's full data in a single request AND be able to edit it If you use identify(), the features you get back will have the bare minimum information that the geoelement needs to display. For example, this would include the ObjectID, display field name, and if applicable, whatever fields are needed for the renderer or labeling info. Everything else will be stripped. This was done for efficiency, as you could identify an area on a map view that has thousands of features. This means that if you use identify, you then need to load them once you want more information. As for query, this will also return unloaded features, unless you specify the enum to have them returned loaded. The feature table should cache whatever info it has already received. So in the case of the query features sample, it has already requested unloaded features for display. It then querys the features, but does not request loaded features to be returned, so it actually does not need to send a request out. I do notice that an extra request goes out, but that is because the extent changes (and we discussed in another thread how this is likely a bug with the feature table caching). If you have any outstanding questions with how this works, let me know.
... View more
12-01-2016
03:03 PM
|
0
|
1
|
1142
|
|
POST
|
Maybe you can log a support ticket and give them your app that can reproduce the crash. They can help troubleshoot, and if it seems like a bug, then log a bug for us to debug it. Otherwise, it is difficult to say why it is crashing. The only other hope would be if you can get a stack trace
... View more
12-01-2016
02:25 PM
|
0
|
0
|
1681
|
|
POST
|
The feature table has a list of fields, which contains names and field types. You could validate against that to make sure you are using the correct data type - FeatureTable Class | ArcGISQtCpp 100.0 Also, if your services make use of FeatureTemplates or FeatureTypes, you could use the createFeature functions that create a new feature based on the feature type or template.
... View more
11-29-2016
07:39 AM
|
0
|
2
|
1392
|
|
POST
|
Taner- It should work. As a test, I opened the "Local geodatabase editing" sample on 2 different machines. I generated a gdb for both, and then I moved on distinct feature on each machine. After I press the sync button, I can see the feature get updated to where it was moved to on the other machine. - Luke
... View more
11-28-2016
07:59 AM
|
0
|
1
|
1614
|
|
POST
|
This question would probably be better suited for the Qt forums - Home | Qt Forum
... View more
11-28-2016
07:26 AM
|
0
|
1
|
1607
|
|
POST
|
Jonathon- This seems like a bug. I can see the same behavior in the sample. Can you please log a bug with Esri Support so they can get it in the system? Thanks, Luke
... View more
11-28-2016
07:24 AM
|
0
|
0
|
810
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 05-27-2026 09:52 AM | |
| 1 | 11-24-2025 10:45 AM | |
| 1 | 07-30-2025 08:26 AM | |
| 1 | 05-15-2025 07:35 AM | |
| 2 | 11-26-2024 01:27 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-17-2026
07:54 AM
|