Shouldn't the test in the if be done using the comparison operator '==' (or '===' as QtCreator usually proposes when editing QML for a reason I forgot), and not the assignement operator '=' ? And by the way, what do you do with the variable 'windDirectionText' ? I can't see it used anywhere except for setting its value ?