A compound of formula or an N -oxide thereof, or a pharmaceutically acceptable salt or solvate thereof: wherein E represents an optionally substituted straight or branched C 1-3 alkylene chain; Q represents oxygen, sulfur, N-R 6 or a covalent bond; M represents the residue of an optionally substituted saturated five-, six- or seven-membered monocyclic ring containing one nitrogen atom and 0, 1, 2 or 3 additional heteroatoms independently selected from N, O and S, but containing no more than one O or S atom; W represents C-R 7 or N; R 1, R 2 and R 3 independently represent hydrogen, halogen, cyano, nitro, C 1-6 alkyl, trifluoromethyl, aryl(C 1-6)alkyl, hydroxy, C 1-6 allcoxy, difluoromethoxy, trifluoromethoxy, C 1-6 alkylthio, C 1-6 alkylsulfinyl, C 1-6 alkylsulfonyl, amino, C 1-6 alkylamino, di(C 1-6)alkylamino, C 2-6 alkylcarbonylamino, C 2-6 alkoxycarbonylamino, C 1-6 alkylsulfonylamino, formyl, C 1-6 alkylcarbonyl, carboxy, C 2-6 alkoxycarbonyl, aminocarbonyl, C 1-6 alkylaminocarbonyl, di(C 1-6)alkylaminocarbonyl, aminosulfonyl, C 1-6 alkylaminosulfonyl or di(C 1-6)alkylaminosulfonyl; R 4 and R 5 independently represent C 1-6 alkyl, aryl, aryl(C 1-6)alkyl, heteroaryl or heteroaryl(C 1-6)alkyl, any of which groups may be optionally substituted by one or more substituents; or hydrogen, halogen, trifluoromethyl, -OR a, -SR a, -SOR a, -SO 2 R a, -NR b R c, -NR c COR d, -NR c CO 2 R d, -NR c SO 2 R e, -COR d, -CO 2 R d, -CONR b R c or -SO 2 NR b R c; R 6 represents hydrogen or C 1-6 alkyl; R 7 represents hydrogen, halogen, C 1-6 alkyl or C 1-6 alkoxy; R a represents C 1-6 alkyl, difluoromethyl or trifluoromethyl; R b represents hydrogen or trifluoromethyl; or C 1-6 alkyl, C 3-7 cycloalkyl, C 3-7 cycloalkyl(C 1-6)alkyl, aryl, aryl(C 1-6)alkyl, C 3-7 heterocycloalkyl, C 3-7 heterocycloalkyl-(C 1-6)alkyl, heteroaryl or heteroaryl(C 1-6)alkyl, any of which groups may be optionally substituted by one or more substituents; R c represents hydrogen, C 1-6 alkyl or C 3-7 cycloalkyl; R d represents hydrogen or C 1-6 alkyl; and R e represents C 1-6 alkyl. E represents an optionally substituted straight or branched C 1-3 alkylene chain; Q represents oxygen, sulfur, N-R 6 or a covalent bond; M represents the residue of an optionally substituted saturated five-, six- or seven-membered monocyclic ring containing one nitrogen atom and 0, 1, 2 or 3 additional heteroatoms independently selected from N, O and S, but containing no more than one O or S atom; W represents C-R 7 or N; R 1, R 2 and R 3 independently represent hydrogen, halogen, cyano, nitro, C 1-6 alkyl, trifluoromethyl, aryl(C 1-6)alkyl, hydroxy, C 1-6 allcoxy, difluoromethoxy, trifluoromethoxy, C 1-6 alkylthio, C 1-6 alkylsulfinyl, C 1-6 alkylsulfonyl, amino, C 1-6 alkylamino, di(C 1-6)alkylamino, C 2-6 alkylcarbonylamino, C 2-6 alkoxycarbonylamino, C 1-6 alkylsulfonylamino, formyl, C 1-6 alkylcarbonyl, carboxy, C 2-6 alkoxycarbonyl, aminocarbonyl, C 1-6 alkylaminocarbonyl, di(C 1-6)alkylaminocarbonyl, aminosulfonyl, C 1-6 alkylaminosulfonyl or di(C 1-6)alkylaminosulfonyl; R 4 and R 5 independently represent C 1-6 alkyl, aryl, aryl(C 1-6)alkyl, heteroaryl or heteroaryl(C 1-6)alkyl, any of which groups may be optionally substituted by one or more substituents; or hydrogen, halogen, trifluoromethyl, -OR a, -SR a, -SOR a, -SO 2 R a, -NR b R c, -NR c COR d, -NR c CO 2 R d, -NR c SO 2 R e, -COR d, -CO 2 R d, -CONR b R c or -SO 2 NR b R c; R 6 represents hydrogen or C 1-6 alkyl; R 7 represents hydrogen, halogen, C 1-6 alkyl or C 1-6 alkoxy; R a represents C 1-6 alkyl, difluoromethyl or trifluoromethyl; R b represents hydrogen or trifluoromethyl; or C 1-6 alkyl, C 3-7 cycloalkyl, C 3-7 cycloalkyl(C 1-6)alkyl, aryl, aryl(C 1-6)alkyl, C 3-7 heterocycloalkyl, C 3-7 heterocycloalkyl-(C 1-6)alkyl, heteroaryl or heteroaryl(C 1-6)alkyl, any of which groups may be optionally substituted by one or more substituents; R c represents hydrogen, C 1-6 alkyl or C 3-7 cycloalkyl; R d represents hydrogen or C 1-6 alkyl; and R e represents C 1-6 alkyl.