Select to view content in your preferred language

Moving from Runtime 100.13 to 200.3 -- > QT Creator Question.

658
9
Jump to solution
07-23-2024 06:25 PM
Labels (3)
ArmandoGarcia3
Occasional Contributor

Hello,

I am not heavily involved in ArcGIS after I created some offline maps for basic location tracking.

With that being said, after have made the maps years ago, I was able to use Runtime 100.13 Runtime SDK to QT in Redhat 8, and after getting it set-up, I was able to see my maps and my assets show up after picking up a GPS Location.

We had been using 5.15.2 for a very long time with ArcGIS Runtime 100.13 with no issue.

We had been interested in moving to QT 6.5.2 for no real reason other than to try it. With that being said, I downloaded ArcGIS Maps 200.3

I just have a couple of questions.

1.) Will any version of ArcGIS Runtime 100.x work with 6.5.2? ( I'm having a hard time finding the old system requirements)

2.) Will I have a hard time moving my current code using 100.13 to 200.3? 

I've already seen all the compile errors and wondering if it is possible with some code adjustment or is it really a gruesome process.

I'll just give one example. Runtime::VerticalAlignment had 6 parameters in 100.13 but 200.3 calls for two, etc

Just looking for some advice because I find the ArcGIS website a bit hard and daunting to navigate at times.

 

I will continue to do my research, but wanted to ask here as well.

Thanks,

Z

0 Kudos
3 Solutions

Accepted Solutions
TroyFoster
Frequent Contributor

1.) Will any version of ArcGIS Runtime 100.x work with 6.5.2? ( I'm having a hard time finding the old system requirements)


https://developers.arcgis.com/qt/v100/reference/system-requirements/

It did take me a little digging to find the old requirements.  As I undertstand it, the switch from Qt5 to Qt6 was a large part of the reasoning for the 100 to 200 change.


2.) Will I have a hard time moving my current code using 100.13 to 200.3? 

I've already seen all the compile errors and wondering if it is possible with some code adjustment or is it really a gruesome process.

Looking back at my notes from my changeover from 100 to 200, the big things for us were:

  1. using qmake6 instead of qmake
  2. Esri changed their includes in their headers so that they forward declare everything they can and then force your user classes to include pieces individually used.  Or there is a single include compatability header that includes everything they have.
  3. Esri removed/updated some functions they had marked as deprecated for quite a while, like on the Error class they changed int error.code() to be [some enum] error.errorType()
  4. Converting a geometry to an envelope, you need to explicitly call .extent and not use the implicit conversion function
  5. Esri made some Geometry base class copy constructors explicit.  They provided geometry_cast functions that does some checking on the type of the geometry.
  6. Qt5 to Qt6 had some changes for how some of their classes behaved, like in QMouseEvent and the parent classes for that.

I'll just give one example. Runtime::VerticalAlignment had 6 parameters in 100.13 but 200.3 calls for two, etc


Where is VerticalAlignment in the documentation?  I see a function for setting that on TextSymbol and an enum named that, but those match up in both 100 and 200.  Or am I looking at c++ documentation and you are looking at Qml or something like that?

View solution in original post

JamesBallard1
Esri Regular Contributor

Hi @ArmandoGarcia3 .

@TroyFoster is spot on with point 2, and the "incomplete type" errors you're seeing are related to our product following c++ best practices and forward declaring everything possible. You can either include all those headers in your project, or we provided an "ArcGISIncludeCompatibility.h" header for situations like this which brings in everything. We don't recommend using that header as it will negatively impact your compile times, but it should get you beyond those errors quickly.

 

 

View solution in original post

GuillaumeBelz
Esri Contributor

Documentation for TextSymbol is here https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-textsymbol.html#TextSymbol-1.

Most of the time, when you have an error about "invalid use of incomplete type 'Esri::ArcGISRuntime::Xxx'", you can fix that by adding the corresponding header #include "Xxx.h".

For enumerations, there is usually a XxxTypes.h header to include. For example, for HorizontalAlignment enum, the header is #include "SymbolTypes.h".  https://developers.arcgis.com/qt/cpp/api-reference/symboltypes-h.html#HorizontalAlignment-enum 

You can find the header to include using the search box in API reference https://developers.arcgis.com/qt/cpp/api-reference/, the header is specified in the top of the page for each class and enumeration.

View solution in original post

9 Replies
GuillaumeBelz
Esri Contributor

Hello,


1.) Will ArcGIS Maps 200.3 work with 5.15.2? ( I'm having a hard time finding the old system requirements)


The documentation for system requirement is here https://developers.arcgis.com/qt/system-requirements/prior-releases/system-requirements-for-200-3. For 200.3, Qt 6.5.1 or higher is supported.


2.) Will I have a hard time moving my current code using 100.13 to 200.3? 


Change in major version means there are some API breaks. But usually, it's easy to fix errors. You can compare sample code changes between 100.13 and 200.3 to see what was changed.

Don't hesitate to ask if you encounter any errors you don't know how to solve.

Guillaume

0 Kudos
ArmandoGarcia3
Occasional Contributor

GuillaumeBelz,

Thanks for the answer.

After reading my post, I realized I made a mistake and edited the post. I meant to ask the following:

1.) Will any version of ArcGIS Runtime 100.x work with 6.5.2? ( I'm having a hard time finding the old system requirements)

I believe 100.x doesn't work with any version of 6, correct? I was trying to go back into older system requirements list for the 100.x version but couldn't find it.

Thank you, I will reach out if I have any issues.

0 Kudos
GuillaumeBelz
Esri Contributor
I believe 100.x doesn't work with any version of 6, correct?

Correct. And 100.x doesn't work with Qt6. Qt follows the same rule about API break in major release https://doc.qt.io/qt-6/qt-releases.html

0 Kudos
RossJohnson5
Emerging Contributor

Me too.  I'm just about at the stage of giving up on ESRI.

 

0 Kudos
TroyFoster
Frequent Contributor

1.) Will any version of ArcGIS Runtime 100.x work with 6.5.2? ( I'm having a hard time finding the old system requirements)


https://developers.arcgis.com/qt/v100/reference/system-requirements/

It did take me a little digging to find the old requirements.  As I undertstand it, the switch from Qt5 to Qt6 was a large part of the reasoning for the 100 to 200 change.


2.) Will I have a hard time moving my current code using 100.13 to 200.3? 

I've already seen all the compile errors and wondering if it is possible with some code adjustment or is it really a gruesome process.

Looking back at my notes from my changeover from 100 to 200, the big things for us were:

  1. using qmake6 instead of qmake
  2. Esri changed their includes in their headers so that they forward declare everything they can and then force your user classes to include pieces individually used.  Or there is a single include compatability header that includes everything they have.
  3. Esri removed/updated some functions they had marked as deprecated for quite a while, like on the Error class they changed int error.code() to be [some enum] error.errorType()
  4. Converting a geometry to an envelope, you need to explicitly call .extent and not use the implicit conversion function
  5. Esri made some Geometry base class copy constructors explicit.  They provided geometry_cast functions that does some checking on the type of the geometry.
  6. Qt5 to Qt6 had some changes for how some of their classes behaved, like in QMouseEvent and the parent classes for that.

I'll just give one example. Runtime::VerticalAlignment had 6 parameters in 100.13 but 200.3 calls for two, etc


Where is VerticalAlignment in the documentation?  I see a function for setting that on TextSymbol and an enum named that, but those match up in both 100 and 200.  Or am I looking at c++ documentation and you are looking at Qml or something like that?

ArmandoGarcia3
Occasional Contributor

Sorry for my confusion, I really was trying to remember off the top of my head what the error was but I was at home.

VerticalAlignment and Horizontal Alignment are functions of TextSymbolArmandoGarcia3_0-1721833401994.png

 

ArmandoGarcia3_1-1721833463545.png

Here a snippet of code that worked with 100.13, but not needs updated with 200.3

ArmandoGarcia3_2-1721833519743.png



I believe we will figure it out, but wanted to reach out to people like you. Thank you for providing the notes you did, they may be of use if we encounter any issues related.

 

0 Kudos
JamesBallard1
Esri Regular Contributor

Hi @ArmandoGarcia3 .

@TroyFoster is spot on with point 2, and the "incomplete type" errors you're seeing are related to our product following c++ best practices and forward declaring everything possible. You can either include all those headers in your project, or we provided an "ArcGISIncludeCompatibility.h" header for situations like this which brings in everything. We don't recommend using that header as it will negatively impact your compile times, but it should get you beyond those errors quickly.

 

 

GuillaumeBelz
Esri Contributor

Documentation for TextSymbol is here https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-textsymbol.html#TextSymbol-1.

Most of the time, when you have an error about "invalid use of incomplete type 'Esri::ArcGISRuntime::Xxx'", you can fix that by adding the corresponding header #include "Xxx.h".

For enumerations, there is usually a XxxTypes.h header to include. For example, for HorizontalAlignment enum, the header is #include "SymbolTypes.h".  https://developers.arcgis.com/qt/cpp/api-reference/symboltypes-h.html#HorizontalAlignment-enum 

You can find the header to include using the search box in API reference https://developers.arcgis.com/qt/cpp/api-reference/, the header is specified in the top of the page for each class and enumeration.

ArmandoGarcia3
Occasional Contributor

Thank you all.

I used "ArcGISIncludeCompatibility.h" and it fixed all my ESRI issues.
I had to make some edits in the .pro file to find certain items

I will look into including the individual headers so I don't have to use the Compatibility header file, but my application still compiled rather quickly.

After making some adjustments in the .pro file, it fixed some final errors, and the GUI is up and RUNNING.

Thank you @TroyFoster @JamesBallard1 @GuillaumeBelz