Qt UI: fix issue 1304