Components
The Qt Digital Advertising is designed as QML module that offers easy to use API to include advertising content in your application. Ads could be enabled for
Apps
targeted for Desktop (Windows/Mac/Linux/other Operating systems)Apps
targeted for Mobile devices (Android/IOS)Apps
targeted for Embedded Devices
This can be achieved with embedded and mobile components that are briefly described in this chapter. Both of these components are visual items representing advertisement content. For those new to QML and Qt Quick, please see Qt Quick documentation first for an introduction to QML applications.
Note: In this chapter, embedded and mobile sections refer only to its specific features, while common ones are introduced in the shared section.
EmbeddedConfig
EmbeddedConfig
is an configuration item designed for EmbeddedAd. It allows to configure parameters in one place which will be shared among all EmbeddedAd instances
Below properties are mandatory to run configure and run advertisements.
qdaApiKey
- api key which is delivered after registration process.venueId
- user-defined ID of the venue that is making the ad request.windowsPreferredMultimediaPlugin
- This property indicates windows multimedia plugin will be used (https://doc.qt.io/qt-5/qtmultimedia-windows.html). Available options are: windowsmediafoundation and directshow. windowsmediafoundation is set by default
EmbeddedAd
EmbeddedAd
is an advertisement item designed for embedded applications.
To properly display advertisements following properties needs to be set up:
deviceId
- user-defined ID of the device, unique for each network ID.displayAreaId
- property used as ID in the context of multiple display areas.
Following properties are noteworthy for the most of the applications:
mediaWidth/Height
- indicates ad content size to be requested from the media server.supportedImage/Video/AudioFormats
- indicates ad content formats to be requested from the media server.adPropertiesId
- indicates which ad properties to load from the file.
For more information, please see EmbeddedAd QML Type.
MobileConfig
MobileConfig
is an configuration item designed for MobileAd. This could be used to configure Desktop device applications as well as Mobile device applications. It allows to configure parameters in one place which will be shared among all MobileConfig instances
Below properties are mandatory to run configure and run advertisements.
qdaApiKey
- api key which is delivered after registration process.dnt
- Acronym for 'do not track'. If this parameter is set to 'true' - then usage statistics are tracked, 'false' - otherwiseqdaApiKey
- api key which is delivered after registration process.networkId
- holds format ID which indicates exact network id.siteId
- holds format ID which indicates exact site id.appName
- holds application name.adDomainUrl
- set your own domain hosting URL where ad configuration files shared by Qt sales team are kept, to be used only for enabling ads for Desktop device applicationsbundleId
- indicates application bundle name e.g. com.test.myApp.windowsPreferredMultimediaPlugin
- This property indicates windows multimedia plugin will be used (https://doc.qt.io/qt-5/qtmultimedia-windows.html). Available options are: windowsmediafoundation and directshow. windowsmediafoundation is set by default
MobileAd
MobileAd
is an advertisement item designed for Mobile device applications and Desktop device Applications.
Following properties are noteworthy for the most of the applications:
formatId
- holds format ID which indicates exact ad content size to be requested from the media server.pageId
- indicates page ID.
For more information, please see MobileAd QML Type.
Shared
Embedded and mobile ad share some properties, signals and methods, e.g.:
playMode
- indicates when an ad will be run e.g. immediately or on idle.displayMode
- indicates how an ad will be run e.g. once or in a loop.play/stop()
- triggers/stops running of an ad.advertisementEnded()
- signal emitted when an ad ends.inactivityTime
- indicates time needed to pass to trigger idle state, in milliseconds.
Moreover ad components inherit properties, signals and methods from Item.
Note: For correct setup, API Key needs to be provided.
For more information, please see API Reference.
© 2023 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.