Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Using Material Style: Wrong fonts



  • Hi,
    I try to use the Material style. I think it uses the roboto fonts by default. I installed those fonts on my machine and it works fine. However, if I want to deploy it to another machine which doesnt have those fonts, clearly the result is looking different. How can I embed those fonts so that it looks the same?



  • @maxwell31 Package the font in a resource file, then call QFontDatabase::addApplicationFont

    QFontDatabase fdb;
    fdb.addApplicationFont(":/res/fonts/roboto.ttf");
    

Log in to reply