In the movies the relationship between Bond and Q has been one of seeming antipathy. The gadgets supplied by Q are almost invariably destroyed as a result of Bond's use of them, and Q is constantly exhorting Bond to take better care of them and occasionally read the instruction manual (which Bond never does). Bond usually responds by displaying an instant mastery of whatever device Q hands to him. In Licence to Kill Q sides with Bond, supplying him with gadgetry and even helping him operationally despite his resignation from the Secret Service.
The ancestry of the Q character is rather complicated. In the Fleming novels there are frequent references to 'Q branch', and in Dr. No the service armourer, Major Boothroyd, replaces Bond's Beretta pistol with a Walther PPK. In the movie Dr. No the character of Major Boothroyd, the armourer, appears, but in From Russia With Love it is Desmond Llewellyn who hands out the gadgets. From then on Llewellyn's character is referred to as Q, but he is also named as 'Major Boothroyd' in The Spy Who Loved Me.
Q (like M) is a job title rather than a name. In The World Is Not Enough an assistant to Q was introduced, known as R and played by John Cleese. In subsequent movies the John Cleese character took over the job of the former Q, and so from then on was known as Q.
Some of the more memorable gadgets supplied by Q include: