Under Law No. 5 of 1981, the State, on 19 May 2004, ‎enforced Law No. (14) of 2004, otherwise known as Qatar Labor Law, where Article 43 thereof ‎impliedly amended Law No. (5) of 1981 by delegating to Employers the absolute discretion to grant ‎visa to a returning worker.

Article 43 is hereby reproduced as follows:‎

Any condition in a service contract shall be void when it contains an undertaking by ‎the worker to work for the rest of his life with the employer or to abstain from carrying ‎out any craft or profession which may be carried out after leaving the work even if the ‎contract is agreed before the coming into force of this law. ‎

If the nature of the work allows the worker to know the clients of the employer or the ‎secrets of the business of the establishment, the employer may stipulate that the ‎worker shall not compete with him or participate in any undertaking competing with ‎him after expiry of the contract. Such stipulation shall be valid only if it is restricted as ‎to its duration and place and to type of the work to the extent necessary for the ‎protection of the legitimate interests of the employer.

The period of such undertaking ‎shall not exceed two years. ‎

-------------------
The first paragraph of Article 43 expressly prohibits employers from engaging in employment slavery, ‎and the second paragraph provides a guideline where the employer may issue NOC to the worker.

Once you have the NOC, you can come in Qatar anytime!