I use to remember it as QDM bearing INBOUND and QDR bearing OUTBOUND.
The 'Q' codes go back to the days before radio when only a Morse Key was used to communicate. QRT 'stop sending' is one I remember for some strange reason. The crew in those days consisted of a Radio Operator who would bang away on a Morse Key while his nibs just flew the aeroplane.
A certain Asian airline I worked for would always use QDM and QDR termology in the SIM which would cause a level of stress amongst the younger ex-pats who tried to work out what it all means.
I understand they picked 'Q' as the lead in to the message because of its distinct sound, dah, dah dit, dah, ( here comes the Bride ). Seriously. The Poms of course, God love 'em.