Setting up the Qt location module

  1. First, create a new Qt Widgets Application project.
  2. After that, open up your project file (.pro) and add the following modules to your Qt project:
QT += core gui location qml quickwidgets 

Besides the location module, we also added qml and quickwidgets modules, which are required by the map display widget in the next section. That is all we need to do for enabling the Qt Location module in our project. Next, we will proceed to add the map display widget to our project.