Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
None
-
None
-
685d2ca3c7a9f221ac12f6db61e02bab40371f5f (qt/qtdeclarative/5.15)
Description
This would allow QQuickItems (specifically those in Controls 2, but it would benefit other use cases too) to be notified of language change events without having to install an event filter on the application.
One way to solve this would be to add QQuickItem::ItemLanguageChange to the ItemChange enum. This would itself still require an event filter though, and having to have e.g. an event filter for each window would still not be that nice, and would also prevent items without a parent from receiving the notification (if that is an issue).
Another option could be to have a translatorInstalled() or languageChange() signal in QCoreApplication. That way, only items that are interested in it would suffer the (connection) overhead.
Attachments
For Gerrit Dashboard: QTBUG-78141 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
273451,9 | QCoreApplication: add languageChanged() signal | 5.15 | qt/qtbase | Status: ABANDONED | 0 | 0 |
290486,7 | Send the LanguageChange event to all top level windows, not just widgets | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
290619,4 | Propagate the LanguageChange events from the QQuickWindow to the items | 5.15 | qt/qtdeclarative | Status: MERGED | +2 | 0 |