10 #include <QApplication>
12 #include <QLibraryInfo>
14 #include <QSplashScreen>
15 #include <QTranslator>
23 auto main(
int argc,
char *argv[]) ->
int
25 QApplication app(argc, argv);
28 QPixmap pixmap(QStringLiteral(
":/resources/logo"));
29 QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
31 splash.setMask(pixmap.mask());
35 QApplication::setOrganizationName(QStringLiteral(
"Thomas Kais"));
36 QApplication::setApplicationName(QStringLiteral(
"FotoBox"));
37 QApplication::setApplicationVersion(QStringLiteral(
"1.4.0"));
39 QTranslator qtTranslator;
40 QTranslator appTranslator;
42 if (qtTranslator.load(QLocale(), QStringLiteral(
"qt"), QStringLiteral(
"_"),
43 #
if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
44 QLibraryInfo::path(QLibraryInfo::TranslationsPath
46 QLibraryInfo::location(QLibraryInfo::TranslationsPath
49 QApplication::installTranslator(&qtTranslator);
53 if (QLocale::system().language() == QLocale::German) {
54 result = appTranslator.load(QStringLiteral(
":/resources/translation_de"));
56 result = appTranslator.load(QStringLiteral(
":/resources/translation_en"));
59 QApplication::installTranslator(&appTranslator);
64 splash.finish(dialog);
67 return QApplication::exec();
Preference class to change and store the application settings.
auto main(int argc, char *argv[]) -> int
main