1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-02 00:10:22 +02:00

Retranslate start game tab on language change

This commit is contained in:
Ivan Savenko 2024-12-14 14:33:58 +00:00
parent 92b49370ed
commit 64db89711e
2 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,14 @@
#include "../../lib/filesystem/Filesystem.h" #include "../../lib/filesystem/Filesystem.h"
#include "../../lib/VCMIDirs.h" #include "../../lib/VCMIDirs.h"
void StartGameTab::changeEvent(QEvent *event)
{
if(event->type() == QEvent::LanguageChange)
ui->retranslateUi(this);
QWidget::changeEvent(event);
}
StartGameTab::StartGameTab(QWidget * parent) StartGameTab::StartGameTab(QWidget * parent)
: QWidget(parent) : QWidget(parent)
, ui(new Ui::StartGameTab) , ui(new Ui::StartGameTab)

View File

@ -39,6 +39,7 @@ class StartGameTab : public QWidget
void refreshPresets(); void refreshPresets();
void refreshGameData(); void refreshGameData();
void changeEvent(QEvent *event) override;
public: public:
explicit StartGameTab(QWidget * parent = nullptr); explicit StartGameTab(QWidget * parent = nullptr);
~StartGameTab(); ~StartGameTab();