If we assume that you will have to pass through immigration for some reason (which you may not actually have to do) and that Qatari immigration officers want departing foreigners to show the same passport they used when they entered (which is probably the case), the question boils down to this:
Do Qatari immigration officers check passports against the manifests of arriving or departing flights?
If the answer is no, then you can use either passport. If the answer is yes for arriving flights, no for departing flights then you should use the Indian passport on your way from India to the UK. If the answer is yes for both then you may have a problem.
However, I have flown several times from the US to Bosnia and Herzegovina by way of the European Union. I have always shown my EU passport in the EU and my US passport in Bosnia, and it has never been a problem in either place that the other passport was the one on the manifest. This doesn't say much about Qatar, obviously, but it does show that such checking is not universal.
Furthermore, Qatar should not much care about your two passports nor about your visa status at your destination (that is normally only the airline's concern). If you show the Indian passport at the exit check on your way to the UK, they probably won't even notice that you don't have a visa for the UK. If they do, you can explain that you also have a Portuguese passport, which you will use there. Unless Qatar has some diplomatic agreement with India where it has undertaken to detect Indian citizens traveling with other countries' passports, that will be the end of the matter.
One other word of advice: I once checked in for a flight from Nairobi to the EU with my EU passport. At the gate, we were asked to show our passports with our boarding passes before getting on the plane. The security agent took my passport and became very concerned. I realized I had handed him my US passport, so I said "I also have this other passport, if that makes any difference," and showed him my EU passport. He immediately relaxed and pointed to the security sticker on the back of the passport. His role, it seems, was to double-check not only the identity of the people boarding the plane, but that they had been given the appropriate sticker at the security screening.
(This trip started in Rwanda, by the way, where I had used my US passport. Rwanda also did not care that I had shown my US passport at the exit check after checking in for the departing flight using my EU passport.)
If you get such a sticker on the back of one passport, you will probably have to show that sticker to someone else at some point. Trying to peel it off and stick it to the other passport is probably not a good idea.