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.
For non-revenue generating applications, you can develop ArcGIS Runtime apps for free and there is no need to authorize your machine. The ArcGIS Developer Program - Essentials Plan, lets you download and install any ArcGIS Runtime SDK and immediately have access to all the functionality of the APIs for development purposes - for free. See ArcGIS for Developers for a brief introduction and see Sign up for a free subscription… to get started. The ArcGIS Developer Program - Builder Plan supports commercial app development; for information about the Builder Plan, see Commercial Deployment at Pricing.
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 Qt Group for developing cross-platform apps. This is not an Esri product. See Get Qtat Qt Group for more information.
- The Qt Framework for Android—This framework is available from Qt Group for developing Android apps. This is not an Esri product.
- Qt Creator—The IDE for Qt app development available from Qt Group. 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.
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.
- Click Get Qt to download and install the appropriate Qt Framework for Windows. 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 a debugger. See the Qt documentation for Setting Up Debugger.
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 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 a 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 a system environment variable called ANDROID_NDK_ROOT, and set it to your NDK folder <staging folder>\android-ndk-<version>.
- Click Get Qt to locate and download the Qt Framework for Android (on Windows).
- Run the Qt for Android installer, accepting all the defaults.
- Setup your environment to use OpenSSL. For more information, see System requirements - OpenSSL.
- In Qt Creator, click Tools > Options > Devices > 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>
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. 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.
- If your app uses grid-based transformations, download supporting Projection Engine files from the downloads page on developers.arcgis.com.
- If your app displays ENC layers, download the hydrography directory from the downloads page on developers.arcgis.com.
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 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.