Transverse momenta of hadronically produced heavy-quark systems: 2. -->. 3 processes in quantum chromodynamics