Q codes were my downfall when I trained to be a ship's radio officer. There were over three hundred to learn and I'm afraid I gave up
I believe they evolved from the Post Office telegraphy two letter codes, when sending Morse code you abbreviate as much as possible. Experienced WT operators would even abbreviate numbers if sending a lot of them ie 1 (.----) would become .- 2 (..---) would become ..- etc. The codes were prefixed by "Q" to make them more obvious, when you heard the letter "Q" you automatically expected a Q code. There have also been Z codes and X codes. All these letters are rarely used in text so they stand out. For most of the codes there is no logic or rationale although it may not be a coincidence that QRS means send more slowly and QRQ means send more quickly. Assigning a "meaning" to the codes just makes them easier to learn. Q has certainly nothing to do with question, a Q code is made into a question by suffixing it with a question mark eg QRL? - are you busy?; QRL - I am busy.
Don