You can embed the font file(s) into your executable using the Qt resource system.
http://qt-project.org/doc/qt-5/resources.html
Then in your application, you can load the embedded font.
QGuiApplication app(argc, argv);
QQuickView view;
// Load the embedded font.
QString fontPath = ":/fonts/MyFont.ttf";
int fontId = QFontDatabase::addApplicationFont(fontPath);
if (fontId != -1)
{
QFont font("MyFont");
app.setFont(font);
}
I suspect that your application is searching for the fonts in your home directory because qmake hard-codes the paths to different resources at compile time. To see the values of these paths, run:
qmake -query
You can override these paths in your application by including a qt.conf file, which you can also embed into the executable using the qt resource system.