Since Pakistan's programs are still shrouded in secrecy, even the JF-17 (still no images of Block III and scant information) it is quite possible that Qatar might have been involved helping Pakistan fund the program as a silent investor. Its just my speculation, however, it is an open secret that they have taken very keen interest in the program, unlike any other gulf state.
Part of this drive might even have been due to the rift between UAE/SA and Qatar, which although it seems to be over on paper, and perhaps in principal, its effects will remain so for quite sometime and mold Qatar's foreign policy accordingly.
I don't honestly see Qatar inducting JF-17s either but if they get involved in funding R&D in Pakistan aerospace industries (AZM, AI Institute, etc.) that will be a huge boon for Pakistan and Qatar will also get the technology and expertise that Pakistan will along with shoring up relations with us. Its a win-win situation.
As regards to Turkey-Pakistan-China cooperation on next gen fighters or other military projects, I can't see much the US can do about that, unless Congress passes specific laws targeting China, like the CAATSA targets Russia. Furthermore, if Pakistan is the conduit of such transfer or technology under local name/production, it muddies the waters even more for a clear cut response by US or anyone else against the Turks. In fact, I would argue that certain agencies in the US not only turn a blind eye towards such a move but even wholeheartedly support it as a way of patching up with Turkey. If the DoD/Pentagon/WH can't get around CAATSA via Congress, they very well could signal the Turks that they will have no such qualms about them getting cozy with the Chinese. So I see great potential there and I think all sides see benefits is such an arrangement.