You can earn qpoints on purchases through Qatar Holidays and at Doha duty free. Be aware of the dates of purchase and the time they may take to be awarded though if the transaction is close to your renewal date:
https://www.qatarairways.com/en/Priv...n-qpoints.html
More reliable and cheaper may be to buy 1 qpoint for $25. But you can only buy qpoints once every 36 months:
https://www.qatarairways.com/en-us/P...y-qpoints.html
Two notes of warning with regard to your itinerary depending on how it is ticketed...
Firstly, you don't mention the class of travel but if the DOH-DXB-DOH sectors were bought as stand alone F tickets you will earn F qpoints on those sectors. But if those sectors are ticketed as connections from eg. an inbound J ticket from LAX you would most likely earn according to the J fare bucket. Have a look at your ticket, the earnings will be according to the fare basis shown, not necessarily the cabin they are seating you in. So that may affect how many qpoints you need to top up. If you are travelling in Y.then it is more straightforward.
And secondly, irrespective of travel class, if you are not planning to break your journey in Dubai and check in again later for the DXB-DPS section, you will not be able to check your bags from LAX-DPS (or.vice.versa) because you cannot have the same airport twice on the same baggage tag. This isn't a QR thing, that's normal for every airline as it confuses the baggage systems. Might not be relevant for your plans but worth being aware of.