I have a mobile app developed in Qt.
Is there a way to support ads with Qt?
Thanks in advance!
There’s a cool, newly released, first party Advertising library from Qt.
To use it:
- be sure you have Qt 5.15.0 or higher installed (up to 6.2.2).
- Install Qt Digital Advertisement plugin from either the installer or from the Maintenance Tool of your already installed Qt environment.
- Copy the profile.dat and configMobile.dat files in your root project (these files will be created specially for your account, and handed over to you from the Qt team)
- Edit your qml.qrc project file to include both of the files from point 3.
... <file>profile.dat</file> <file>configMobile.dat</file> </qresource>
- Place the MobileAd qml view inside your screen qml. And you’re all done!
For now Qt has a single MobileAd qml component, that can be manipulated at your own desire and from which you can create:
- Banner (Anchor) ads
- Interstitial (Fullscreen) ads
- Native (Inline) ads
In the near future the library will also support Rewarded ads.
Answered By – Qt Dev
Answer Checked By – Katrina (BugsFixing Volunteer)