If you are running a Qt applications in VMware Workstation running VMware Tools 11.1.5 then this may happen to you too. Your program runs perfectly but when you try to exit the process hangs in the background.
To fix this, add this environment variable to disable opengl 3.x and drop down to opengl 2.1
SVGA_VGPU10 = 0
See the following article for details