Qt

From My wiki
Jump to: navigation, search

About

You must know C++ before coming here.

PRO

i18n

TRANSLATIONS = languages/tr_en.ts \
               languages/tr_pt.ts

Copy files to destination

Let's say that you want to copy translations files to the compiled directory

file_copies

COPIES += translations
translations.files = $$files(languages/*.*)
translations.path = $$OUT_PWD/languages

QString

QStringBuilder

include <QStringBuilder>

Now you can concat strings using "%"

Resource Files

QString path = ":/resourceName/path/to/file";

QFile partFile(path % "part.tex");

if (partFile.open(QIODevice::ReadOnly)) {
...
}
partFile.close();

XML Parsing

https://gimmenotes.co.za/wp-content/uploads/2018/12/ParsingXMLTutorialCh15-01.pdf