The answer to that question will depend on the kind of getaway you want. You can spend up to 3 days in Quebec City. That will give you enough time to explore the city centre including the old city. However, if you want to have a leisurely stay and really get to explore the different neighborhoods and explore nearby areas then a week is good.