You can have this kind of problem if the terminal in Qt-Creator can't display correctly the character although you C++/Qt code is valid (for me it was the problem).
In this case, here is the solution in two simple steps (you will need to restart your computer).