Book Image

QT5 Blueprints

By : Symeon Huang
Book Image

QT5 Blueprints

By: Symeon Huang

Overview of this book

Table of Contents (17 chapters)
Qt 5 Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Deploying Qt applications on Android


The internationalization application requires a QM file to be loaded correctly. On Windows and Linux, we choose to install them alongside the target executable. However, this is not always a good approach, especially on Android. The path is more complicated than the desktop operating systems. Besides, we're building a Qt application instead of the Java application. Localization is definitely different from a plain Java application, as stated in the Android documentation. Hence, we're going to bundle all the resources into the qrc file, which will be built into the binary target:

  1. Add a new file to project by right-clicking on the project, and then select Add New….

  2. Navigate to Qt | Qt Resource File in the New File dialog.

  3. Name it res and click on OK; Qt Creator will redirect you to edit res.qrc.

  4. Navigate to Add | Add Prefix and change Prefix to /.

  5. Navigate to Add | Add Files and select the .Internationalization_de.qm file in the dialog.

Now, we need to edit mainwindow...