Thank you for your question.
For the purposes of taxation, your residency is based on where you reside on the last day of the tax year for which you are filing. As a result, if you live in Québec on Dec. 31, you must file a tax return with Revenu Québec. However, if you live in Ontario on that day, you do not need to file in Québec.
Please see the Canada Revenue Agency (CRA) website for: Your province or territory of residence.
Thank you for choosing TurboTax.