Disclosed is a use of a quinazoline compound of Formula I having 2,4-diaminoquinazoline as a parent nucleus in preparation of a medicament for treating diseases caused by flaviviridae infection, especially a use in combating Hepatitis C virus infection and Dengue fever virus infection.