Start here to set up your development environment with ArcGIS Runtime SDK for Qt. You can have multiple versions of this SDK existing on the same machine. You can also have ArcGIS Runtime SDK for Qt on the same machine as other ArcGIS Runtime SDKs.
No license is required to develop ArcGIS Runtime apps; there's no need to authorize your development machine. As a member of the ArcGIS Developer Program, you have a free ArcGIS Developer Subscription (Essentials Plan). With this plan you can download and install any ArcGIS Runtime SDK and immediately have access to all the functionality of the APIs for development purposes. You can become a member of the developer program for free.
This topic describes how to set up the following:
- ArcGIS Runtime SDK for Qt for Windows.
- The Qt Framework for Windows—This framework is available from The Qt Company for developing cross-platform apps. This is not an Esri product.
- The Qt Framework for Android—This framework is available from The Qt Company for developing Android apps. This is not an Esri product.
- Qt Creator—The IDE for Qt app development available from The Qt Company. This is not an Esri product.
See ArcGIS Runtime SDK for Qt System Requirements for detailed software requirements.
Install Visual Studio
The Microsoft Visual Studio compiler is used to build apps with the ArcGIS Runtime SDK for Qt. It is recommended that you uninstall previous versions of Visual Studio and any previous Visual Studio redistributables before installing Visual Studio, or conflicts can occur during installation. Be sure to install the C++ compiler. One way to do this is to select the Visual Studio installation option to use the C++ programming language as your default development environment.
Install Microsoft WinDbg
To debug using Qt Creator with Visual Studio, download and install WinDbg, the stand-alone debugging tool for Windows. Be sure to download the version that matches your operating system.
Download the Qt Framework for Windows
To build an app using the ArcGIS Runtime SDK for Qt, you need the Qt Framework designed to work with your compiler. You can install Qt Frameworks for multiple target platforms on your development machine, side-by-side.
- Download and install the appropriate Qt Framework for Windows from The Qt Company. This download will include Qt Creator.
- Open SSL support is required. Open SSL allows access to secure services that need user credentials. It is not delivered with the Qt Framework. For more information, see the Qt documentation about adding SSL support to your Qt app.
Install prerequisites for Android app development
Note:This section only applies to you if you are developing apps for the Android platform. If not, then proceed to the following section in this topic, titled Tell Qt Creator where to find the Qt Framework.
Install the prerequisite software for Android app development, including the Java SE Development Kit, Android SDK Tools, Android Platform Tools, the Android NDK, and a USB driver to communicate with a mobile device. See Qt for Android for more details information on developing for Android with Qt. Also, be sure to install software versions that conform to the ArcGIS Runtime SDK for Qt System Requirements.
- Browse to Getting Started with Qt for Android. Follow the instructions there to download and install the prerequisite software. It is suggested that you create a new staging folder to store all the prerequisite software, such as C:\Android. This folder is referred to in these instructions as <staging folder>.
- Access the settings for Environment variables on your development machine. You can find this via the Control Panel under Advanced System Settings. If the following environment system environment variables are not already defined, define them as follows:
- Create an system environment variable called JAVA_HOME, and set it to the install location of the JDK folder, such as C:\Program Files\Java\jdk<version>.
- Create an system environment variable called ANDROID_NDK_ROOT, and set it to your NDK folder <staging folder>\android-ndk-<version>.
- Download the Qt Framework for Android (on Windows) from The Qt Company.
- Run the Qt for Android installer, accepting all the defaults.
- OpenSSL libraries for Android are included with the SDK for testing purposes only. Apps you build that use prf files included with this SDK, including the ArcGIS Runtime app templates and sample apps, use these OpenSSL libraries. These libraries are not intended to be deployed to end users. Before deploying your app to end users, please obtain the latest OpenSSL libraries and deploy those with your app. For more information, see the Qt documentation about adding SSL support to your Qt app.
- In Qt Creator, click Tools > Options > Android and fill in the paths. Paths will be similar to the following:
- JDK Location: C:\Program Files\Java\jdk<version>
- Android SDK Location: <staging folder>\adt-bundle-windows-<platform>-<date>\sdk
- Android NDK Location: <staging folder>\android-ndk-<version>
- Ant Location: <staging folder>\apache-ant-<version>\bin\ant.bat
Tell Qt Creator where to find the Qt Framework
It is typical to use one Qt Creator IDE with multiple Qt Frameworks, such as one Framework for desktop development and another to build and deploy to a mobile device. Qt Creator needs to know where to find the Qt Frameworks you want to use. It looks for Qt Frameworks on your development machine but may not detect all the Qt Frameworks you want to use. This can happen when you have multiple Qt Frameworks on your development machine, or if you install additional Qt Frameworks after installing Qt Creator.
Follow these steps to tell Qt Creator about additional Qt Frameworks:
- Click Tools > Options > Build & Run > Qt Versions, and click Add.
- Browse to find the qmake.exe file in the installation location.
- Provide a suitable name for this Qt Framework.
- Click Apply.
After completing these steps, the Qt Framework you specified will appear under the heading Manual. You can now use these Qt Frameworks to configure kits and projects.
Install ArcGIS Runtime SDK for Qt
- Make sure you have read/write access to your desired download location.
- Click the product's download link.
- Run the extraction wizard, which asks you to choose the extraction location.
- Run setup.exe from the extraction location. Installing ArcGIS Runtime SDK for Qt on Windows requires administrative privileges.
- After the setup program finishes, the post-installer starts. The post-installer integrates the ArcGIS Runtime SDK for Qt with your installation of the Qt Framework and Qt Creator by copying files to locations within those install locations. Choose the Qt components you want to configure. Choose only components that are installed on your development machine. For each component you choose, provide a path to the component. For Qt Creator, use the path to the Qt Creator app. For Qt Frameworks, use the path to qmake.exe in the Framework's install location. Please note that the post-installer needs read/write access to the User Profile's AppData folder.
- If you want to run offline geoprocessing tasks in your C++ app, install Local Server by following the steps at Local Server.
- If you want to use StreetMap Premium data in your app, download the regions you want, as described in Add StreetMap Premium data.
Configure kits and projects
In Qt Creator, a kit defines how to build an app for a target device. A kit includes references to the compiler, the Qt Framework, and the debugger.
- Click Tools > Options > Build & Run > Kits.
- Examine the existing kits. If no existing kit has the settings you want, click Add to create a new kit.
- Give the kit an appropriate name.
- Set Device type to Desktop.
- Choose the appropriate compiler.
- Choose the CDB Engine debugger. If the debugger you want does not appear in the list of options, make sure that you have installed the WinDbg debugger, as mentioned in a previous step.
- Choose the Qt Version.
- Click OK or Apply to finish creating the kit.
- Repeat the previous steps to add Android kits if you installed the Qt Framework for Android.
- Create a project in Qt Creator for your ArcGIS Runtime SDK for Qt app. You can use a provided project template to create a new project. See Develop your first map app for more information about using a project template.
- When you open a Qt Creator project file for the first time, Qt Creator prompts you to configure the project. This means choosing the kits you want to use with the project. Choose the kit you created in the earlier step, and click Configure Project.
You can now build your project in Qt Creator.