it is better to inquire from the Immigration prior to your departure...

what i know is there is an approval letter and some fee involved for extended stay (for more than 6-months) outside the country with valid justification !

i guess many parents who have kids studying outside Qatar prefer to do that rather to disturb their studies and pay for the tickets - just for an entry within 6 months !