Thermoelectric properties of p-type quantum wells (QWs) with flat subbands are investigated theoretically. The effects due to valence-band mixing and strain in QWs are considered in the calculation of electrical conductivity (σ), Seebeck coefficient (S), thermal conductivity, and figure of merit (ZT). It is found that the maximum ZT of QWs can be enhanced under strain. Such an enhancement of ZT results from the fact that the enhancement of S2 is stronger than the reduction of σ. The maximum values of ZT at room temperature can reach 0.55, 0.7, and 2.2 for GaAs, InAs, and InSb QWs with well width of 5 nm. For comparison, the ZT values of p-type silicon (Si) and germanium (Ge) QWs are also calculated. The optimal ZT values of Si and Ge QWs at room temperature can reach 0.21 and 0.3, respectively.