Good call. Your queen is very often an out, and your 2 sometimes is too. You are also beating 46, 42 and gutshots and lower flush draws. That plus 35-40% of equity you already have when he holds a 5 or a 3. Very profitable call.
But you have to know what you would do if your opponent shoves before you bet. Then you can act accordingly.