> Sent: Monday, May 23, 2016 at 8:31 AM
> From: "Kristoffersen, Even (NO14)" <[email protected]>
> To: "[email protected]" <[email protected]>
> Subject: [Interest] qsTr in components
>
> Hello all,
>
> I've played around a bit with an approach inspired by
> http://wiki.qt.io/How_to_do_dynamic_translation_in_QML .
>
If you are following along, the example a few months ago, it works. I'm using
it, and in components too.
You need to add a C++ object, and expose it to QML.
it has a proeprty: Q_PROPERTY(QString null READ getNull NOTIFY languageChanged )
signals:
void languageChanged(QString language);
When you change the language, you emit that signal, that causes the
re-evaluation of all string with the langMgr.null added.
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest