Indeed there are visa which are not transferable. The best that your friend can do is to get an NOC from his/her current sponsor and come back to Qatar under the new employer's sponsorship.

I know about this as it happened to us before wherein we are trying to transfer the sponsorship of the person we want to hire but then, when it reached immigration, we were told that the visa is not transferable.

The employee went home with an NOC and we hired him with out own visa.