It's not so much how much total you can qualify for, so much as the question is how much of a monthly payment can you qualify for. When you get pre-approved, and eventually approved for a mortgage, they base everything on your monthly payment and your monthly debt-to-income ratio. Mortgage companies calculate how much you make monthly, how much you would owe monthly (includes all debts, not just mortgage), and then figure out the percentage. You will be approved if the percentage falls within a range that you are allowed based on your credit, the amount of liquid assets you own, and the actual appraisal vs. purchase price of the home.
The reason why bad credit hurts you, is that it increases your interest rate, and therefore increases your monthly payment and your debt-to-income ratio as a result.
http://realestate.yahoo.com/calculators/afford.html;_ylt=AlwnVruds0qa.HXQ1jyjUgj9j8kF This is a handy (although not wholly accurate) calculator to help figure out how much you can afford. Remember, only your lender and broker will be able to fully approve you for any amount. Good luck!