After the first quasiperiodic eruption (QPE; GSN 069) was reported in 2019, four other sources have been identified as a QPE or a candidate. However, the physics behind QPEs is still unclear, although several models have been proposed. Pan et al. proposed an instability model for an accretion disk with magnetically driven outflows in the first QPE of GSN 069, which is able to reproduce both the light curve and the evolution of the spectra fairly well. In this work, we extend this model to all QPEs. We improve the calculations of the spectrum of the disk by introducing a hardening factor, which is caused by a deviation of opacity from a blackbody. We find that the light curves and evolution of the spectra of the four QPEs and candidates can all be well reproduced by our model calculations.