QT: fixed locale bug and some more improvements