There is a Q-5 version that has a laser targeter right on the nose.
There is a chance that even with the supposedly better performance of the J-7E/G, the Q-5 may outlive the J-7 in the PLAAF.
The reasons for this.
The role of an attacker is less demanding than that of a fighter.
The sharp nose of the Q-5 gives a much better downward view than a J-7.
The sharp nose makes it easier to install targeting devices compared tothe oval nose cone of the J-7.
The plane is tough, resistant to battle damage and if damaged, easy to repair and maintain. With two engines, it has a built in redundancy over the J-7's one. This plane is the airborne equivalent of the AK-47. It's crude, but its simple and it works. And it can easily be built cheap and in numbers.
It is quite popular with the pilots, though the J-7 is too. The J-6 where the Q-5 is based from was quite difficult to fly, although it was very maneuverable. The flying difficulties were first shared among early Q/A-5s. But later as the design progressed, the plane becomes progressively more stable and easier to fly, yet maintaining much of its maneuverbility. At low altitudes, the plane can dogfight and give an account for itself on this, as evidenced by the PAF experience of the plane in DACT exercises against other types. This was probably why there is some resistance on the PLAAF to move over to the much more advanced JH-7A, which is much bigger and won't be as agile. In every division that is converting to the JH-7A, they are moving over the Q-5s to the second or third regiments of that division.