I want to dynamically retranslate Qt Quick GUI strings.
There is intrusive trick to retranslate affected string properties, whose notifications about changes cannot be centralized.
Is it possible to make qsTr
(and others) to return string
-like objects, which behaves exactly like string
, but also behaves like global properties connected to common "valueChanged" signal (which I want to emit, when QEvent::LanguageChange
in QCoreApplication
occured).
I think I can use twitching of Loader
's active
property, which contains entire top level GUI element to make all the user-visible strings retranslated, but this approach results in lost of the state of all the items and components, connected to the Loader
and not differs from complete application restart for me.
Is it possble to create such myQsTr
function?