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?
↧
[SOLVED] [Qt5] crash when using qApp and installTranslator But working when using qApp and setFont
↧