The invention is directed to quinoline derivatives as prostaglandin E type receptor antagonists useful for the treatment of EP4 mediated diseases or conditions, such as acute and chronic pain, osteoarthritis, rheumatoid arthritis 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 the proviso that they cannot both simultaneously be CH, Q can represent a nitrogen or a carbon atom, and Y and Z are either a nitrogen atom, a N(O) group or a C(R5) group. Pharmaceutical compositions comprising the derivatives of formula (I) are also included.