For the correct setup, the Qt Digital Advertising user needs to provide an API Key.

The API Key is an alpha-numeric string token that the plugin user receives after the completed registration process.

It is used to identify the user and fetch parameters required to play the advertisements and monetize the application.

The API Key should be provided via qdaApiKey property of Config Components.

We would recommend to setup the API Key before advertisement components are created (e.g. EmbeddedAd).

Note: If you don't have your API Key, contact us.

Config Components

Config components are used to provide QML API that allows to specify Qt Digital Advertising configuration parameters (e.g. API Key).

Following snippet is an example of a config component:

import QtDigitalAdvertising 1.1

    id: qdaConfig
    qdaApiKey: "paste-your-api-key-here"
    networkId: "4147"
    siteId: "492520"
    appName: "ExampleApp"
    bundleId: ""

MobileAd {
    width: 320;
    height: 250
    playMode: QtDigitalAdvertising.AutoPlay
    displayMode: QtDigitalAdvertising.Loop
    pageId: "1515277"
    formatId: "104693"

For more information, please see EmbeddedConfig QML Type or MobileConfig QML Type.

Ads Properties

Advertisement parameters can be optionally reconfigured by creating adsproperties.ini file and deploying it in a search paths.

This file should contain ad properties in the JSON format, e.g.:

  "Adv_1": {
  "Adv_2": {

  "Adv_3": {

The plugin QML property “adPropertiesId” indicates which object from adsproperties.ini will be used for configuration and the default parameters will be overridden by the ones provided in the ini file.

The parameters which can be overridden:

configFileLocation : string
deviceId : string
latitude : double
longitude : double
orderId : string
supportedApplicationFormats : string
supportedAudioFormats : string
supportedImageFormats : string
supportedVideoFormats : string
venueId : string

Search Paths

Configuration files are searched for in various paths.

Following list presents search paths order:

  1. Property configFileLocation (if exists and is set up).
  2. Qt Resource System (i.e. :/).
  3. Directory that contains the application executable (i.e. QCoreApplication::applicationDirPath()).

When a configuration file exists under any of the previously mentioned paths, the search is complete and any remaining paths are ignored.

© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.