From what I read, Hatch Act has no limitations on time before (or after, for that matter) any elections.
It prohibits (a certain group of employees in the executive branch) from engaging in some forms of political activity at ALL times.
So, in that case, the argument doesn't work. Also, Q might not belong to the executive branch (e.g. MIL; or Hatch Act may not apply to them for other reasons, e.g. POTUS is exempt from Hatch Act).