-
Book Overview & Buying
-
Table Of Contents
QT5 Blueprints
By :
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:
Add a new file to project by right-clicking on the project, and then select Add New….
Navigate to Qt | Qt Resource File in the New File dialog.
Name it res and click on OK; Qt Creator will redirect you to edit res.qrc.
Navigate to Add | Add Prefix and change Prefix to /.
Navigate to Add | Add Files and select the .Internationalization_de.qm file in the dialog.
Now, we need to edit mainwindow...
Change the font size
Change margin width
Change background colour