diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 3f44bfb21..800fc3af5 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1118,6 +1118,18 @@ void MainWindow::showEvent( QShowEvent *event ) isInitialized = true;//first show windows are held } +//--------------------------------------------------------------------------------------------------------------------- +void MainWindow::changeEvent(QEvent *event) +{ + if (event->type() == QEvent::LanguageChange) + { + // retranslate designer form (single inheritance approach) + ui->retranslateUi(this); + } + // remember to call base class implementation + QMainWindow::changeEvent(event); +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief closeEvent handle after close window. diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index 0aa106f60..a55bf6d92 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -158,6 +158,7 @@ signals: protected: virtual void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; + virtual void changeEvent(QEvent* event) Q_DECL_OVERRIDE; virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE; virtual void customEvent(QEvent * event) Q_DECL_OVERRIDE; virtual void CleanLayout() Q_DECL_OVERRIDE;