 The character of Major Boothroyd is addressed as such by  Barbara Bach (qv) for one of the only times in the movie series.  Boothroyd (played by Desmond Llewelyn (qv)) is the head of Q  branch, but the name Q stuck to the character.