We have modelled the X-ray emission of T Tauri stars assuming that they have isothermal, magnetically confined coronae. These coronae extend outwards until either the pressure of the hot coronal gas overcomes the magnetic field, or, if the corona interacts with a disc before this happens, by the action of the disc itself. This work is motivated by the results of the Chandra Orion Ultradeep Project that show an increase in the X-ray emission measure (EM) with increasing stellar mass. We find that this variation (and its large scatter) results naturally from the variation in the sizes of the stellar coronae. The reduction in the magnitude of the X-ray emission due to the presence of a disc stripping the outer parts of the stellar corona is most pronounced for the lower mass stars. The higher mass stars with their greater surface gravities have coronae that typically do not extend out as far as the inner edge of the disc and so are less affected by it. For these stars, accretion takes place along open field lines that connect to the disc. By extrapolating surface magnetograms of young main-sequence stars, we have examined the effect on the X-ray emission of a realistic degree of field complexity. We find that the complex fields (which are more compact) give densities of some (2.5-0.6) × 1010cm-3. This is consistent with density estimates of (1-8) × 1010cm-3 from modelling of individual flares. A simple dipole field in contrast gives densities typically an order of magnitude less. For the complex fields, we also find surface hotspots at a range of latitudes and longitudes with surface-filling factors of only a few per cent. We find that the dipolar fields give a relationship between X-ray EM and stellar mass that is somewhat steeper than observed, while the complex fields give a relation that is shallower than observed. This may suggest that T Tauri stars have coronal fields that are slightly more extended than their main-sequence counterparts, but not as extended as a purely dipolar field.