A thermosetting resin composition comprising(A) a polyimide comprising 10 to 90 mole % of repeating units of the formula: ##STR53## wherein Ar is a divalent group represented by the following formula (a) or (b): ##STR54## wherein hydrogen atoms in each benzene ring is unsubstituted or is substituted with one or more alkyl groups having 1 to 3 carbon atoms or alkoxy groups having 1 to 2 carbon atom