Single holes confined in semiconductor quantum dots are a promising platform for spin-qubit technology, due to the electrical tunability of the g factor of holes. However, the underlying mechanisms that enable electric spin control remain unclear due to the complexity of hole-spin states. Here, we study the underlying hole-spin physics of the first hole in a silicon planar metal-oxide-semiconductor (MOS) quantum dot. We show that nonuniform electrode-induced strain produces nanometer-scale variations in the heavy-hole-light-hole (HH-LH) splitting. Importantly, we find that this nonuniform strain causes the HH-LH splitting to vary by up to 50% across the active region of the quantum dot. We show that local electric fields can be used to displace the hole relative to the nonuniform strain profile, allowing a mechanism for electric modulation of the hole g tensor. Using this mechanism, we demonstrate tuning of the hole g factor by up to 500%. In addition, we observe a potential sweet spot where dg (110) /dV = 0, offering a configuration to suppress spin decoherence caused by electrical noise. These results open a path towards a technology involving engineering of nonuniform strains to optimize spin-based devices.