Fixed Input method handling in Qt5 environment