Qt Purchasing

Qt Purchasing is an add-on library that enables Qt applications to support in-app purchases. It is a cross-platform library that currently supports purchases made to the Mac App Store on OS X, App Store on iOS, and Google Play on Android.

In-App Purchases

In-app purchases are a way to monetize an application. These purchases are made from inside the application and can include anything from unlocking content to virtual items. The Qt Purchasing API is built on the system APIs for in-app purchases, which means the purchase process is more familiar to the user, and the information already stored by the platform (such as credit card information) can be used to simplify the purchase process.


Qt Purchasing provides C++ classes and QML types to access information about in-app products registered in the external store on the current platform, as well as to request purchases for those products.

The Store

The in-app products must be registered in the target stores, before they can be queried or purchased in an application. We recommend using the same identifiers for the products in each store, as it simplifies the code to query and purchase the products.

Writing the Code

Depending on what fits best with the application, you can choose to use either C++ or QML to support in-app purchasing. If most of the user interface is written in QML, we recommend that you use the QML types, which provide a simple and declarative point of access for the products in the store.


查看 Qt Purchasing Examples 了解如何在应用程序中使用 API 的演示。


Qt Purchasing is available under commercial licenses from Qt 公司 。此外,它是可用的在 GNU LGPL (次一般公共许可) 第 3 版 。见 Qt 许可 进一步了解细节。

Furthermore Qt Purchasing on Android contains third party modules under the following permissive licenses:

Base64 解码器

Apache 许可 2.0

In-app billing service

Apache 许可 2.0

Public Key Verification

Apache 许可 2.0

API 参考