First, disable the task in QMC, then delete or remove the App from the directory. From there, I think you can go back into the QMC and delete it, if it is not already gone.
The key is to disable it, or uncheck Enable, before you do anything. If you deleted the app, you have create a new app with the same name, put it in the directory, disable the task, then remove the app and delete the task.
It is a bit of a pain, but unchecking Enable first is the key.