qt: Add helper to load font

This commit is contained in:
João Barbosa
2021-10-06 15:06:40 +01:00
parent c0b6c96eee
commit d54ec27bac
3 changed files with 12 additions and 2 deletions

View File

@@ -272,6 +272,12 @@ bool hasEntryData(const QAbstractItemView *view, int column, int role)
return !selection.at(0).data(role).toString().isEmpty();
}
void LoadFont(const QString& file_name)
{
const int id = QFontDatabase::addApplicationFont(file_name);
assert(id != -1);
}
QString getDefaultDataDirectory()
{
return boostPathToQString(GetDefaultDataDir());