Translations:Development/Tutorials/First program/KF5/43/en

From KDE TechBase
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

</syntaxhighlight> First we need to create a QApplication object. This needs to be done exactly once in each program since it is needed for things such as i18n. It also should be created before any other KDE or Qt object. A call to KLocalizedString::setApplicationDomain() is required to properly set the translation catalog and must be done before the next step happens.