qt: Fix font only applying to main window

This commit is contained in:
ts-korhonen
2022-02-04 23:01:53 +02:00
parent cfd8eb9e61
commit 11e805de78

View File

@@ -67,7 +67,7 @@ MainWindow::MainWindow(QWidget *parent) :
#ifdef Q_OS_WINDOWS #ifdef Q_OS_WINDOWS
auto font_name = tr("FONT_NAME"); auto font_name = tr("FONT_NAME");
auto font_size = tr("FONT_SIZE"); auto font_size = tr("FONT_SIZE");
setFont(QFont(font_name, font_size.toInt())); QApplication::setFont(QFont(font_name, font_size.toInt()));
#endif #endif
mm = std::make_shared<MediaMenu>(this); mm = std::make_shared<MediaMenu>(this);
@@ -1575,7 +1575,7 @@ void MainWindow::changeEvent(QEvent* event)
{ {
auto font_name = tr("FONT_NAME"); auto font_name = tr("FONT_NAME");
auto font_size = tr("FONT_SIZE"); auto font_size = tr("FONT_SIZE");
setFont(QFont(font_name, font_size.toInt())); QApplication::setFont(QFont(font_name, font_size.toInt()));
} }
#endif #endif
QWidget::changeEvent(event); QWidget::changeEvent(event);