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 Linux.
- The Qt Framework for Linux: The Framework available from The Qt Company for developing cross-platform applications. Not an Esri product.
- The Qt Framework for Android: The Framework available from The Qt Company for developing Android applications. Not an Esri product.
- Qt Creator: The IDE for Qt application development available from The Qt Company. Not an Esri product.
Download the Qt Framework for Linux
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. Be sure to 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
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, and the Android NDK. 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 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 ~/Android. This folder is referred to in these instructions as <staging folder>.
- Download the Qt Framework for Android (on Linux) from The Qt Company.
- Run the Qt Framework for Android installer, accepting all the 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 will 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>
For developers choosing to use an Android Virtual Device (AVD) for testing a deployment from Qt Creator, it is important that they check the Use Host GPU checkbox under Emulation Options on the dialog for creating a new AVD.
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 later install another Qt Framework.
Follow these steps to tell Qt Creator about additional Qt Frameworks:
- Click Tools > Options > Build & Run > Qt Versions, and 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 appear under the heading Manual. You can now use these Qt Frameworks to configure kits and projects.
Repeat these steps for the Qt Framework for Android if you installed it.
Install the ArcGIS Runtime SDK for Qt
- Make sure you have read-write-execute access to your desired ArcGIS installation location.
- Click the product's download link.
- Save the file to an installation location large enough to hold both the gzip file and the tar file extracted content.
- 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 ./Setup from the extraction location. Note: 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.
- 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 computer. For each component you choose, provide a path to the component. 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. Please note that the post-installer needs read/write access to ~/.config
- Add the path to the ArcGIS Runtime for Qt library files to the environment variable LD_LIBRARY_PATH. The path is <install location>/arcgis/runtime_sdk/<sdk version>/sdk/linux/<platform>/lib. You can do this in your Qt Creator project settings, or by setting the LD_LIBRARY_PATH environment variable before starting Qt Creator.
- 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 (the StreetMap Premium extension), download the demonstration data from the downloads page for development and testing. Please contact Esri Customer Service for access to a region of your choice for development and testing or to licence StreetMap Premium data for deployment.
- 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.
Configuring 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 for the platform you are developing for.
- Choose the appropriate debugger. If there is no appropriate debugger, you may need to install it. Refer to your operating system documentation.
- Choose the Qt Version.
- Click OK or Apply to finish creating the kit.
- Repeat steps 2–8 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 will prompt 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.