string.startsWith() is not available in Qt versions lower than 5.8. Replace with string.indexOf()

This commit is contained in:
dsc
2018-12-09 14:55:04 +01:00
parent e650818016
commit b466f9fe96
2 changed files with 2 additions and 2 deletions

View File

@@ -453,7 +453,7 @@ Rectangle {
fontBold: true
inlineIcon: true
onTextChanged: {
if (amountToReceiveLine.text.startsWith('.')) {
if(amountToReceiveLine.text.indexOf('.') === 0){
amountToReceiveLine.text = '0' + amountToReceiveLine.text;
}
}