Drug action and receptors

Two ligands bind a receptor with similar affinity. Ligand P activates it, while ligand Q prevents agonist binding but causes no measurable response by itself. Which distinction explains their different actions?