Improve dynamic translation.

This commit is contained in:
Roman Telezhynskyi 2022-06-04 16:13:21 +03:00
parent 5f2d0e95a8
commit 93f21830e1
2 changed files with 14 additions and 0 deletions

View File

@ -123,6 +123,17 @@ void VWidgetDetails::ToggledPiece(quint32 id)
}
}
//---------------------------------------------------------------------------------------------------------------------
void VWidgetDetails::changeEvent(QEvent *event)
{
if (event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
// remember to call base class implementation
QWidget::changeEvent(event);
}
//---------------------------------------------------------------------------------------------------------------------
void VWidgetDetails::InLayoutStateChanged(int row, int column)
{

View File

@ -57,6 +57,9 @@ public slots:
void SelectDetail(quint32 id);
void ToggledPiece(quint32 id);
protected:
virtual void changeEvent ( QEvent * event) override;
private slots:
void InLayoutStateChanged(int row, int column);
void ShowContextMenu(const QPoint &pos);