Examples

Introduction

You can test that your Qt installation is successful by opening an existing example application project.

There are three examples: embedded, mobile and widget, which are located Qt Digital Advertising examples in the Qt examples directory (e.g. by default, for Windows, C:/Qt/Examples/QtDigitalAdvertisement + Qt_VERSION).

To run an example simply load the project with a project file (.pro) delivered with the example, paste your qdaApiKey in the MobileConfig or EmbeddedConfig, then build and run.

Note: Running an example requires setup of the API Key.

Note: Examples are available only for the Qt Creator.

EmbeddedAd

You can run an embedded application example on desktops or embedded devices of your choice.

MobileAd

To run an mobile application example on an Android or iOS device, you must set up the development environment for Android or iOS. For more information, see Connecting Android Devices and Connecting iOS Devices.

Demo Showcase

In the example application you can find samples for the 4 most popular types of ads usually used in applications:

  1. Anchored - presented as a sticky ad, either on the top or the bottom of a screen.
  2. Full Screen - shown on a new screen, can be closed immidiately or after a period of time as a rewarded ad, depending on how the developer decides to let it’s users interact with it.
  3. Inline - displayed among your content that is usually scrolled by the user. Popular ad type for blogs or any other application that has scrollable content.
  4. Fluid - dynamically sized ad.

EmbeddedAd

"Embedded example Demo"

Embedded example application in action.

MobileAd

"Mobile example Demo"

Mobile example application in action.

Qt board game

Qt board game is a cross-platform, open source, (https://github.com/qt-io/qt-board-games) game as a sample for the Digital Ads plugin, as well as for testing purposes of monetisation on iOS and Android. Try it out to see how monetisation works on mobile:

To learn more about developing advertisements code, see QML Types Reference.

© 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.