Use Qt.inputMethod.visible to hide the map tool bar instead of using customed focus properties.