Some people, when asking a question at the end of a seminar, make comments on the talk first along the lines of "great talk," "really enjoyed this talk," or similar phrases. Is this a desirable thing to do? I've noticed that most people don't do this, but some of my favorite scientists do.
My personal preference is not to offer a compliment in this setting. It often strikes me as less sincere (off-handed or perfunctory). If I really want to compliment someone, I tend to catch up with them later and start with something like "I really enjoyed your talk. If you have a minute to talk, I have a question for you about..." On the other hand, I know that some people feel like asking questions (especially if they are critical of some aspect of the work) can feel hostile, and so they find the compliment as a good way to off-set that.
When asking a question, it is desirable to explicitly establish a non-confrontational tone. It is natural and common (though of course not correct) to interpret even well-meaning questions in an antagonistic way. If the speaker feels threatened, they will be less able to focus on the content of the question and may instead become defensive. A question that is interpreted as non-confrontational is therefore likely to get a better answer.
Complimenting the speaker is one way to make your subsequent question non-confrontational, and is a good idea as long as you are sincere. Other ways include saying something nice about the topic itself ("you're studying a very interesting question"), smiling, and carefully controlling your tone of voice. These are especially important if your question amounts to a criticism of the presented material.
I agree with the other posters.
Personally, I try to make my tone of voice, attitude and choice of words respectful when asking a question while the conference is in session (and of course otherwise). I try to indicate indirectly that I enjoyed the talk (if indeed I did), without offering a direct compliment.
You note your favourite scientists being complimentary to speakers. I expect that these scientists are well-established, well-regarded and that they know that any praise from them would be a particular boost to, in particular, more junior scientists.
It is not desirable, but you can do it if you want. But do it shortly, because there is not a lot of time for questions after a talk. Personally, I think that saving the compliment as a way to start a discussion later with the speaker is preferable.
To tell the truth, I also think that, except for clarification requests, questions are better asked in a discussion with the speaker, after the session. This is the only way to have complete and clear answers.