BannerAd QML Type
Banner advertisement. More...
Import Statement: | import QtDigitalAdvertising |
Inherits: |
Properties
- adUnitId : QString
- keywords : QStringList
- nonPersonalizedAds : bool
- testDevicesIds : QStringList
Signals
Methods
Detailed Description
The BannerAd module offers easy to include advertisement banners in your application. To use this module in your Qt Quick application, add the following import statement to your QML file.
import QtDigitalAdvertising 2.0
The advertisement requested from a media server are based on the set up properties. Bare-minimum plugin properties set-up:
BannerAd{ adUnitId: "/6499/example/banners" bannerType: BannerAd.BANNER }
Property Documentation
adUnitId : QString |
[Required] This property holds adUnitId
keywords : QStringList |
[Optional] This property holds list of key-value pairs that you can pass within your request for targeting
nonPersonalizedAds : bool |
[Optional] This property indicates are allowance of personalied ads.
testDevicesIds : QStringList |
This property holds list of test devices ids. To find you test device id check the application output for a message like:
I/Ads: Use RequestConfiguration.Builder.setTestDeviceIds(Arrays.asList("33BE2250B43518CCDA7DE426D04EE231")) to get test ads on this device."
Signal Documentation
void clicked() |
This signal is emitted when the advertisement was clicked.
Note: The corresponding handler is onClicked
.
void loadError(int errorId) |
This signal is emitted when the error occurs with errorId.
Note: The corresponding handler is onLoadError
.
void loaded() |
This signal is emitted when the advertisement is successfully loaded.
Note: The corresponding handler is onLoaded
.
void loading() |
This signal is emitted when the advertisement begins to load.
Note: The corresponding handler is onLoading
.
Method Documentation
hide() |
Triggers hide of the advertisement.
reload() |
Triggers reload of the advertisement.
void show() |
Triggers playing the advertisement.
© 2024 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.