Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.1
-
None
-
7edd8ee9a6885e57715c50be1dd402d9bd5118c8
Description
ListElement's cannot take scripts as property values. Unfortunately, this means that qsTr() cannot be used.
ListElement
{ name: qsTr("Apple"); cost: 2.45 }AFAICT, ListModel can support i18n only by adding elements through JavaScript.
It would also be very useful to add script support for the following use case:
ListElement
{ name: qsTr("Go to root"); cost: 2.45; script: <script> }ListElement
{ name: qsTr("Delete"); cost: 2.45; script: <script> }ListElement
{ name: qsTr("Search from here"); cost: 2.45; script: <script> }I also tried to wrap the ListElement contents in a separate QtObject and assign the new object to this. That didn't work either since ListElement cannot contain nested elements
Attachments
Issue Links
- resulted in
-
QTBUG-42497 ListElement cannot use qsTr()
-
- Closed
-
-
QTBUG-20631 Additional type support for qsTr() in ListElement
-
- Reported
-