Here's how to get started with ArcGIS Runtime API for Qt:
- Review system requirements
- Install and set up
- Get an access token (to access location services)
- Complete the Display a map tutorial
1. System requirements
Ensure your development environment meets the system requirements.
For an overview of this release, including enhancements, deprecations, and known issues, see the release notes.
2. Install and set up
ArcGIS Runtime SDK for Qt has APIs for developing desktop apps for Windows, Linux, and macOS, and mobile apps for iOS and Android. You can install the API on Windows, macOS, or Linux.
You will install the following components on your Windows development machine:
- Microsoft Visual Studio C++ compiler
- A Qt Framework for Windows: this framework is available from The Qt Company for developing cross-platform apps. This is not an Esri product.
- A Qt Framework for Android: (for Android developers) 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 automatically included when you download Qt Framework for Windows. This is not an Esri product.
- ArcGIS Runtime API for Qt for Windows
Install Visual Studio
The Microsoft Visual Studio compiler is used to build apps with ArcGIS Runtime API 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.
Download the Qt Framework for Windows and Qt Creator
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.
- Click Get Qt to download and install the appropriate Qt Framework for Windows. This download includes Qt Creator.
- Open SSL support is required. Open SSL allows access to secure services that require 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 a debugger. See the Qt documentation for Setting Up Debugger.
Install prerequisites for Android app development
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 information on developing for Android with Qt. Also, be sure to install software versions that conform to the system requirements.
- Browse to Getting Started with Qt for Android. Follow the instructions to download and install the prerequisite software. It is suggested that you create a new staging folder to store the prerequisite software, such as
C
. This folder is referred to in the download and install instructions as a:\ Android <staging folder
.> - Access the settings for Environment variables on your development machine. You can find this in the Control Panel > Advanced System Settings. If the following system environment variables were not previously established, define them as follows:
- Create a system environment variable called
JAVA
, and set its location to the Java\JDK folder, for example_HOME C
.:\ Program Files\ Java\jdk <version > - Create a system environment variable called
ANDROID
, and put it in your NDK folder_NDK _ROOT <staging folder
.>\android-ndk- <version >
- Create a system environment variable called
- Click Get Qt to locate and download the Qt Framework for Android (on Windows).
- Run the Qt for Android installer, accepting all installer defaults.
- Set up your environment to use OpenSSL. For more information, see the OpenSSL section in the system requirements topic.
- In Qt Creator, click Tools > Options > Devices > Android and fill in the paths. Paths should 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 >
- JDK Location:
Tell Qt Creator where to find your Qt Framework(s)
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. By default, it looks for Qt Frameworks on your development machine, but might not detect all the Qt Frameworks you want to use if you have multiple Qt Frameworks on your development machine or if you later install another Qt Framework.
Follow these steps to tell Qt Creator about additional Qt Frameworks:
- Click Tools > Options > Build & Run > Qt Versions, and then click Add.
- Browse to the
qmake.exe
file in the installation folder. - Provide a suitable name for this Qt Framework.
- Click Apply.
After completing these steps, the Qt Framework you specified will be shown under the heading Manual. You can now use this Qt Framework to configure kits and projects.
Install ArcGIS Runtime SDK for Qt
- Make sure you have read/write access to your desired download and extraction location and that your account has administrative privileges, as installing ArcGIS Runtime SDK for Qt on Windows requires administrative privileges.
- Go to the downloads and select the Windows download for the most recent version of ArcGIS Runtime SDK for Qt. Note that you can download older versions as well as other development platforms.
- Run the extraction wizard, which asks you to choose an extraction location.
- Run setup.exe from your chosen extraction location.
- After the setup program finishes, the post-installer starts. This integrates ArcGIS Runtime SDK for Qt with your installation of the Qt Framework and Qt Creator. Choose the Qt components you want to configure, selecting only those components that are installed on your development machine. For each component you choose, you must provide the path to that component. Please note that the post-installer needs read / write access to the User Profile's AppData folder.
- 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.
Configure Qt Creator kits
In Qt Creator, a kit defines how to build an app for a target device. Set up a kit for each target device to which you will deploy your app so that you can develop and test for that device. Each kit must include references to the compiler, the Qt Framework, and the debugger. At minimum, you should set up a desktop kit.
- Run Qt Creator.
- 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 the Device type to to match your target device, such as Desktop.
- Choose the appropriate compiler to match the target device.
- Choose the Qt Version.
- Click OK or Apply to finish creating the kit.
Repeat these steps to add an Android kit if you installed the Qt Framework for Android.
Configure a Qt Creator project
- Create a project in Qt Creator for your ArcGIS Runtime API for Qt app. You can use a provided project template to create a new project.
- Complete the Display a map tutorial to verify your development environment is properly configured.
- When you open a Qt Creator project file for the first time, Qt Creator prompts you to configure the project, which requires choosing the kits to use with the project. Choose the kit(s) you created in the previous step, and then click Configure Project.
You can now build your project in Qt Creator on Windows.
You will install the following components on your macOS development machine:
- Apple Xcode
- The Qt Framework for macOS: this framework is available from The Qt Company for developing cross-platform applications. This is not an Esri product.
- The Qt Framework for iOS: (for iOS developers) this framework is available from The Qt Company for developing iOS applications. This is not an Esri product.
- The Qt Framework for Android: (for Android developers) this framework is available from The Qt Company for developing Android applications. This is not an Esri product.
- Qt Creator: the IDE for Qt application development available from The Qt Company bundled with Qt Framework for macOS. This is not an Esri product.
- ArcGIS Runtime SDK for Qt for macOS
Install Xcode
Install Xcode and the Xcode command line tools from the App Store or Apple's developer web site. An Apple developer account is required to log in. Follow the documentation at Apple's accounts web site.
Download the Qt Framework for macOS and Qt Creator
To build an application using ArcGIS Runtime API 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 Qt Framework for macOS from The Qt Company. Make sure that you also install Qt Creator along with the Qt Framework.
Install prerequisites for iOS development
If you plan to develop applications for the iOS platform, you must install Xcode for iOS. See Qt for iOS for more information on Qt for iOS.
- Start Xcode.
- Click Xcode > Preferences.
- On the Downloads tab, click Component, and download the iOS simulator.
- Configure your Xcode for Distribution by following the documentation at Apple's web site.
- Download and install the Qt Framework for iOS (on Mac) from The Qt Company.
Install prerequisites for Android development
Install the prerequisite software for Android app development, including the Java SE Development Kit, Android SDK Tools, Android Platform Tools, and the Android NDK. See Qt for Android for more details on developing for Android with Qt. Be sure to install software versions that conform to the 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
~/
. This folder is referred to in the download and install instructions as aAndroid <staging folder
.> - Download the Qt Framework for Android (on Mac) from The Qt Company.
- Run the Qt Framework for Android installer, accepting all installer defaults.
- Set up your environment to use OpenSSL. For more information, see the OpenSSL section of the system requirements.
- In Qt Creator, click Qt Creator > Preferences > Devices > Android, and fill in the paths. Paths should be similar to the following:
- JDK Location:
<staging folder
>/ Current JD K/ Home - Android SDK Location:
<staging folder
>/adt-bundle-mac-x86 _64- <date >/sdk - Android NDK Location:
<staging folder
>/android-ndk- <version >
- JDK Location:
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. By default, it looks for Qt Frameworks on your development machine, but might not detect all the Qt Frameworks you want to use if you have multiple Qt Frameworks on your development machine or if you later install another Qt Framework.
Follow these steps to tell Qt Creator about additional Qt Frameworks:
- Start Qt Creator.
- Click Qt Creator > Preferences > Build & Run > Qt Versions, and then click Add.
- Browse to the
qmake
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 be shown under the heading Manual. You can now use this Qt Framework to configure kits and projects.
Repeat these steps for any Qt Frameworks for Android and iOS you previously installed.
Install ArcGIS Runtime SDK for Qt
- Make sure you have read/write access to your desired download and extraction location.
- Go to the downloads page and select the macOS download for the most recent version of ArcGIS Runtime SDK for Qt. Note that you can download older versions as well as other development platforms.
- Run the installer app.
- After the installer app finishes, the post-installer starts. This integrates ArcGIS Runtime API for Qt with your installation of the Qt Framework and Qt Creator. Choose the Qt components you want to configure. Choose only components that are installed on your development machine. For each component you choose, you must provide a path to the component. Note that the post-installer needs read/write access to
~/.config
.- For Qt Creator, use the path to the Qt Creator app.
- For Qt Frameworks, use the path to the
qmake
executable in the Framework's install location.
Configure Qt Creator kits
In Qt Creator, a kit defines how to build an app for a target device. Set up a kit for each target device on which you will deploy your app to so that you can develop and test for that device. A kit includes references to the compiler, the Qt Framework, and the debugger. At minimum, you should set up a desktop kit.
- Run Qt Creator.
- Click Qt Creator > Preferences > 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 to match your target device, such as Desktop.
- Choose the Qt Version.
- Click OK or Apply to finish creating the kit.
Repeat these steps to add an iOS or Android kit if you installed those Qt Frameworks.
Configure a Qt Creator project
- Create a project in Qt Creator for your ArcGIS Runtime API for Qt app. You can use a provided project template to create a new project.
- Complete the Display a map tutorial to verify that your development environment is properly configured.
- When you open a Qt Creator project file for the first time, Qt Creator prompts you to configure the project, which requires choosing the kits to use with the project. Choose the kit(s) you created in the previous step, and then click Configure Project.
You can now build your project in Qt Creator on macOS.
You will install the following components on your Linux development machine:
- The Qt Framework for Linux: this framework is available from The Qt Company for developing cross-platform applications. This is not an Esri product.
- The Qt Framework for Android: (for Android developers) this framework is available from The Qt Company for developing Android applications. This is not an Esri product.
- Qt Creator: the IDE for Qt application development available from The Qt Company bundled with The Qt Framework for Linux. This is not an Esri product.
- ArcGIS Runtime SDK for Qt for Linux
Download the Qt Framework for Linux and Qt Creator
To build an application using the ArcGIS Runtime SDK for Qt, you will 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 Linux from The Qt Company. Make sure that you also install Qt Creator along with the Qt Framework.
- 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 application.
Install prerequisites for Android development
Install the prerequisite software for Android app development, including the Java SE Development Kit, Android SDK Tools, Android Platform Tools, and the Android NDK. See Qt for Android for details about developing for Android with Qt. Be sure to install software versions that conform to the 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
~/
. This folder is referred to in the download and install instructions as aAndroid <staging folder
.> - Download the Qt Framework for Android (on Linux) from The Qt Company.
- Run the Qt Framework for Android installer, accepting all the installer defaults.
- Set up your environment to use OpenSSL. For more information, see the OpenSSL section of the system requirements topic.
- In Qt Creator, click Tools > Options > Devices > Android, and fill in the paths. Paths should be similar to the following:
- JDK Location:
<staging folder
>/jdkl. <version > - Android SDK Location:
<staging folder
>/android-sdk-linux - Android NDK Location:
<staging folder
>/android-ndk- <version >
- JDK Location:
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. By default, it looks for Qt Frameworks on your development machine but might not detect all the Qt Frameworks you want to use if you have multiple Qt Frameworks on your development machine or if you later install another Qt Framework.
Follow these steps to tell Qt Creator about additional Qt Frameworks:
- Start Qt Creator.
- Click Tools > Options > Build & Run > Qt Versions, and then click Add.
- Browse to the
qmake
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 be shown under the heading Manual. You can now use this Qt Framework to configure kits and projects.
Repeat these steps for any Qt Frameworks for Android you previously installed.
Install ArcGIS Runtime API for Qt
- Make sure you have read-write-execute access to your desired ArcGIS installation location.
- Go to the downloads page and select the Linux download for the most recent version of ArcGIS Runtime SDK for Qt. Note that you can download older versions as well as other development platforms.
- Save the file to an installation location large enough to hold the extracted content from the
gzip
andtar
files. - Unzip the ArcGIS Runtime gzip file to get the tar file. At the prompt, type
% gunzip .tar.gz
. - Extract the product tar file to create the installation directory:
% tar xvf .tar
. - Run the script
./
from the installation location. Do not double-click on the file in the file browser and select Run in Terminal, or the post-installer will start and then exit as soon as the terminal window closes.Setup - 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. Choose the Qt components to configure. Choose only those components that are installed on your computer. For each component you choose, provide a path to the component. Please note that the post-installer needs read / write access to
~/.config
.- For Qt Creator, use the path to the Qt Creator app.
- For Qt Framework installations, use the path to the
qmake
executable in the Qt Framework's install location.
- Add the path to the ArcGIS Runtime for Qt library files to the environment variable
LD
. The path is_LIBRARY _PATH <install location
. You can do this in your Qt Creator project settings, or by setting the>/arcgis/runtime _sdk/ <sdk version >/sdk/linux/ <platform >/lib LD
environment variable before starting Qt Creator._LIBRARY _PATH
Configure Qt Creator kits
In Qt Creator, a kit defines how to build an app for a target device. Set up a kit for each target device on which you will deploy your app to so that you can develop and test for that device. A kit includes references to the compiler, the Qt Framework, and the debugger. At minimum, you should set up a desktop kit.
- Run Qt Creator.
- 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 the Device type to to match your target device, such as Desktop.
- Choose the appropriate compiler for your development platform.
- Choose the appropriate debugger. If there is no appropriate debugger, you will need to install one. Refer to your operating system documentation.
- Choose the Qt Version.
- Click OK or Apply to finish creating the kit.
Repeat these steps to add an Android kit if you installed the Qt Framework for Android.
Configure a Qt Creator project
- Create a project in Qt Creator for your ArcGIS Runtime API for Qt app. You can use a provided project template to create a new project.
- Complete the Display a map tutorial to verify that your development environment is properly configured.
- 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 to use with the project. Choose the kit(s) you created in the previous step, and then click Configure Project.
You can now build your project in Qt Creator on Linux.
3. Get an access token
To access secure ArcGIS services and resources, you need to use an access token. The easiest way to get started is to obtain an access token from an API Key. Learn more about access tokens and authentication in Security and authentication.
4. Tutorials
Follow step-by-step instructions to build apps that incorporate ArcGIS Runtime functionality.
Deploy your app
When you begin developing ArcGIS Runtime apps, you are accepting Esri's end user license agreement (EULA); there is no need to authorize your development machine or devices. Once you have finished building your application, you are required to obtain a license before deploying it to production. Licensing ensures that you have the necessary permissions and legal rights to distribute and use your application in a commercial or public environment. For more information, see the License and deployment topic for details.