The invention is directed to quinoline derivatives as prostaglandin E typereceptor antagonists useful for the treatment of EP4 mediated diseases orconditions, such as acute and chronic pain, osteoarthritis, rheumatoidarthritis and cancer. The derivatives have the following structure of formula(I): wherein A and B represents either a nitrogen atom or a CH group with theproviso that they cannot both simultaneously be CH, Q can represent a nitrogenor a carbon atom, and Y and Z are either a nitrogen atom., a N(O) group or aC(R5) group. Pharmaceutical compositions comprising the derivatives of formula(I) are also included.