This disclosure relates to application of hedgehog pathway inhibitor in treatment for fibrosis diseases. Specially, the disclosure provides a method for treating and preventing fibrosis diseases. The method mentioned includes administering subjects in need with an effective amountof a hedgehog pathway inhibitor, whererin said hedgehog pathway inhibitor is a compound represented by the Formula (I) or a pharmaceutically acceptable salt or prodrug thereof:wherein C cyclic group, D1-D4, Q1, Q2, R5 are defined herein.