If you are in family visit visa and you wish to go outside Qatar. Just go to Immigration office and ask for Return Visa, this will be valid until your family visa will be expired. If you'd stayed here more than a month, you have to obtain exit permit in immigration too. Hope that i'll help