When you come off Qatar, ask for connections - staff will take you. Go to the KQ connection desk (always staffed) and get your onward boarding pass, and get them to sort your luggage out (if any checked in).
The KQ lounges are open 24 hours and if in J (or Elite status), you can use for as long as you need. If purchasing access, there is a time limit, but not sure if it enforced.