Ok, it seems the problem is "solved" if gnupg-agent is not launched with XMODIFIERS, QT_IM_MODULE and GTK_IM_MODULE. Seems obvious to me now since the problem appears outside of kmail, with just gpg-connect-agent. So it really seems to be the same bug as the one reported in Red Hat bugzilla.
signature.asc
Description: This is a digitally signed message part.