Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

[SOLVED] [Qt5] crash when using qApp and installTranslator But working when using qApp and setFont

$
0
0
I would like to install my fonts and i have done the following: _fontDatabase->addApplicationFont(”:/fonts/HelveticaNeue.ttf”); fontDatabase->addApplicationFont(”:/fonts/HelveticaNeue-Bold.ttf”); qApp->setFont(QFont(“Helvetica Neue”));_ and this seems to work but when i do the same for translations it fails _if (anitaTranslator->load(“anita_nl”, “:/translations/”)) qApp->installTranslator(anitaTranslator);_ even though both use the same setup + because it tries to install the translator i know it has found the file and still crashes. another thing i find strange is that when doing this QGuiApplication *app = QGuiApplication::instance(); the compiler complains that it is getting a QCoreApplication instead of a QGuiApplication am i doing something wrong?

Viewing all articles
Browse latest Browse all 4972

Trending Articles