DocumentViewer: Use events for retranslation


Unify the language switching mechanism so that both OS locale changes and
manual language selection go through the events.
Instead of manually handling retranslation from the main window,
let widgets and viewers react to QEvent::LanguageChange themselves.
The main window now only installs the translator on language switch,
and handles LanguageChange in changeEvent() to retranslate its UI.
Viewer plugins use an event filter to detect LanguageChange and
update their own translations.

Pick-to: 6.11
Change-Id: I2d712b7c89b850cd3eaf10a6e75368f4fc139ec0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
commit3dd226340236c0edad92d80203d13dedb027c36a
parent61db54498e73aaf93abb91af9dcd9f0288a43fe9
authorMasoud Jami <masoud.jami@qt.io>
committerMasoud Jami <masoud.jami@qt.io>
commit timeWed, 8 Apr 2026 16:20:09 +0200