I have used different variations with success, here's one example using a single '=' operator with success.
Problem is, my output text is stuck on "NE" and does not change when selecting different days, so clearly there is something wrong with my code, but I have no idea what, so any clues here would be appreciated.
DetailItem { //% "WindDirection" label: qsTrId("Wind direction") value: { if (weather.windDirection == 0) return 'N'; else if (weather.windDirection == 45) return 'NE'; else if (weather.windDirection == 90) return 'E'; else if (weather.windDirection == 135) return 'SE'; else if (weather.windDirection == 180) return 'S'; else if (weather.windDirection == 225) return 'SW'; else if (weather.windDirection == 270) return 'W'; else if (weather.windDirection == 315) return 'NW'; } }