简体   繁体   English

Qt 跨平台移动ADS支持?

[英]Qt cross-platform mobile ADS support?

I have a mobile app developed in Qt .我有一个在Qt开发的移动应用程序。

Is there a way to support ads with Qt?有没有办法用 Qt 支持广告

Thanks in advance!提前谢谢

There's a cool, newly released, first party Advertising library from Qt . Qt有一个很酷的、新发布的第一方广告库。

To use it:要使用它:

  1. be sure you have Qt 5.15.0 or higher installed (up to 6.2.2).确保您已安装 Qt 5.15.0 或更高版本(最高 6.2.2)。
  2. Install Qt Digital Advertisement plugin from either the installer or from the Maintenance Tool of your already installed Qt environment.安装程序或已安装的 Qt 环境的维护工具中安装 Qt 数字广告插件。
  3. 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)复制根项目中的profile.datconfigMobile.dat文件(这些文件将专门为您的帐户创建,并由 Qt 团队交给您)
  4. Edit your qml.qrc project file to include both of the files from point 3.编辑您的qml.qrc项目文件以包含第 3 点中的两个文件。
        ...
        <file>profile.dat</file>
        <file>configMobile.dat</file>
    </qresource>
  1. Place the MobileAd qml view inside your screen qml.MobileAd qml 视图放置在屏幕 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:目前 Qt 有一个单独的MobileAd qml 组件,您可以根据自己的意愿对其进行操作,并从中创建:

  • Banner (Anchor) ads横幅(锚)广告
  • Interstitial (Fullscreen) ads插页式(全屏)广告
  • Native (Inline) ads原生(内嵌)广告

In the near future the library will also support Rewarded ads.在不久的将来,图书馆还将支持奖励广告。

For more details please follow the documentation or blog posts .有关更多详细信息,请关注文档或博客文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM