Hi

If u r holding a Passport from Europe , America or any such 30 countries which is approved by Qatar can obtain on arrival visit visa(30 days validity)by paying QR-100 and upon completion of 30 days u can fly to Bahrain or Dubai n reenter same day, mean time if ur hubby's resident visa is stamped thn he can do the formalities for ur permanent resident visa under his own sponsorship, I believe this is the easiest solution. feel free if u want to any more details.

Good Luck