I want to make translations on my toolbar. The toolbar is a listmodel:
import QtQuick 1.1
ListModel {
id:tBar
ListElement {
buttonText: QT_TR_NOOP("Cars In Speed Function")
bottomText: ""
event: "carsInSpdFn"
buttonLevel: "0"
buttonBurst: false
icon: "qrc:/icons/histogram_128x128_w.png"
color: "#369c3b"
active: true
permissionLevel: 0
}
ListElement {
buttonText: QT_TR_NOOP("Clear all logs")
bottomText: ""
event: "cleraAllLogs"
buttonLevel: "0"
buttonBurst: false
icon: "qrc:/icons/trash_128x128_w.png"
color: "steelblue"
active: true
permissionLevel: 3
}
The list is called in file to property variant value. Main file:
/..
DynamicApp{
id: statistics
objectName: "Statistics"
toolbarModel: ToolbarModel{}
title: qsTr("Statistics management")
icon: "qrc:/icons/statistics_128x128_w.png"
../
The DynamicApp is the qml file where is defined window of the app. There is defined toolbarModel which is "property variant". DynamicApp:
/..
Rectangle {
id: app
width: main.width
height: main.height
color: layout_id.bgColor
opacity: 0
property variant parameter;
property bool useToolbar: true
property bool useTopbar: true
property bool activeApp: false
property variant toolbarModel
property string title: ""
property string icon: ""
../
I know how to translate model lists by qsTr or qsTranslate but I don't know how to cal it into property variant becouse there is calling into all file toolbarModel. Can you explain me how to translate this list in my app?