The problem was that the corresponding window was not the active window - a call to showFullscreen /activateWindow made it work.