
Originally Posted by
joko
It is actually working in this way, however when I tried to run it into the actual device, the issue still occur.
Must be something else then.
Unfortunately I don't have a device here to test this with.

Originally Posted by
joko
The 'title' is coming from the model and it is actually working fine, all my text properties in Text elements, I used qsTr. You mean it is not advisable to do it that way?
No, sorry, misunderstanding.
Of course qsTr() is the correct function, but it needs to be at the source string, so that lupdate can extract it for the translation file.
In this code snippet it is used on a variable.
Text {
text: qsTr("Hello World") // OK
}
Text {
property string predefinedText: qsTr("Hello World") // OK
text: predefinedText
}
Text {
property string predefinedText: "Hello World"
text: qsTr(predefinedText) // Not OK, lupdate has no way of finding "Hello World"
}
Text {
text: qsTr("Hello World") // OK
}
Text {
property string predefinedText: qsTr("Hello World") // OK
text: predefinedText
}
Text {
property string predefinedText: "Hello World"
text: qsTr(predefinedText) // Not OK, lupdate has no way of finding "Hello World"
}
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks