Код: Выделить всё
function calculateDate(input) {
var result = something_this_takes_too_much_of_the_time * input;
}
Repeater {
count: 999
Label {
text: return (new Promise(resolve => calculateDate(somevalue) )).then(text => text)
}
}
к сожалению, это не работает, выдает ошибку:
Код: Выделить всё
Unable to assign QJSValue to QString
Код: Выделить всё
return (new Promise(resolve => calculateDate() )).then(text => text.toString())
return (new Promise(resolve => calculateDate().toString() )).then(text => text)
Код: Выделить всё
return (new Promise(resolve => calculateDate() )).then(text => text).toString()
так как мне добиться что я ищу?
Подробнее здесь: https://stackoverflow.com/questions/793 ... t-in-label
Мобильная версия