You may comeback anytime with a family visa, but if you are asking if you can work, that is another story, Qatar labor law prohibit foreign workers for 2 years when they quit or resign from their work, unless otherwise you have NOC from your previous employer, that could be fine.
That is all i know & understand about Qatar Labor Law, hope there could be some feedbacks from reliable people here.
Cheers!