AA uses Terminal 3 at LHR while Qatar uses Terminal 4. That means one needs a lot of patience and gets a lot of exercise on this terminal change and connection. No need to clear customs as inter-terminal bus service operates point-to-point service between the terminals. It's a long walk just to get to that bus, although signage is quite good.
Once in T4, another security check to get in. IMO, Britain has to rank right up there with the worst, most clueless and inefficient security screening on the planet.