Hi,
In the link you provided there is a special case: "If your spouse was resident in Québec for only part of the year, you must take into account his or her income for the entire year (including income earned while he or she was not resident in Québec)."
So it seems tobe line 275 plus the amount earned while not a resident (line 19).