We consider QCD radiative corrections to the associated production of a heavy-quark pair ($Q{bar Q}$) with a generic colourless system $F$ at hadron colliders. We discuss the resummation formalism for the production of the $Q{bar Q}F$ system at small values of its total transverse momentum $q_T$. The perturbative expansion of the resummation formula leads to the explicit ingredients that can be used to apply the $q_T$ subtraction formalism to fixed-order calculations for this class of processes. We use the $q_T$ subtraction formalism to perform a fully differential perturbative computation for the production of a top-antitop quark pair and a Higgs boson. At next-to-leading order we compare our results with those obtained with established subtraction methods and we find complete agreement. We present, for the first time, the results for the flavour off-diagonal partonic channels at the next-to-next-to-leading order.