AFAICT, QT_IM_MODULE is set by the package im-config.
I didn’t investigate very deeply, but removing the package (apt remove im-config), followed by a reboot I managed to get rid of the annoying pop up.
5 Likes