I opened Kate to paste some text. It put up a message about saving existing files or data (the message is gone now of course) and when I declined to save it, the desktop shut down, the system shutdown sequence started, and my machine powered off. I'm not sure what logs might have pertinent information about this.
Leslie -- Platform: Linux Distribution: openSUSE Leap 15.6 - x86_64 Desktop Environment: Trinity Qt: 3.5.0 TDE: R14.1.2 tde-config: 1.0