Hello! I worked in Quebec January to April but moved out to another province where I was by December 31st. do I have to file income tax return with QC and CRA too?

Do we need to file tax with Quebec if we are working and resident in another province by December 31st?