Background and Aims: In Iran, few studies have addressed the moderating effect of gender on determinants of quality of life. This study aimed to determine the effect of social trust, physical activity, and sense of happiness on the perceived quality of life, considering the moderating role of gender. Methods: This was a population‐based cross‐sectional study. The statistical population were men and women aged 16 years and above in five western provinces of Iran. The final sample size was estimated to be 1268 people calculated through the correlation coefficient estimation formula, and finally 1185 questionnaires received. Data were analyzed using SPSS and AMOS software. Results: The mean score of quality of life among women was significantly higher than that of men (p < 0.001). The direct standardized coefficient showed that the sense of happiness (β = 0.40), social trust (β = 0.20), and physical activity (β = 0.12) had a significant effect on the perceived quality of life (p < 0.001). Also, gender had a moderating role in the relationship between sense of happiness and perceived quality of life (z‐score = 3.246, p < 0.001). Totally, 21% of the changes in perceived quality of life were explained by three main variables. The main variables were stronger explanatory factors in men (R = 0.26) than in women (R = 0.17). Conclusions: The final model showed that sense of happiness had the most direct effect on the perceived quality of life, moderated by gender. Considering that the quality of life among men was lower than that among women and the direct effect of happiness on quality of life was more among men than that among women, it is suggested that gender‐based health promotion interventions with an emphasis on men be carried out to strengthen the sources of happiness to improve quality of life.