When a cop has two seconds or less to make a decision on whether to use deadly force they are not thinking about the parameters of a lawsuit three years later.
What people do not get about qualified immunity is a) it is qualified, meaning it is not automatic; and b) it does not foreclose other kinds of lawsuits or actions. On the latter, even if a cop gets QI on a federal civil rights claim he and his city or agency can still be sued for all sorts of state law torts, negligence, battery, etc.
Folks that do not understand this (and that's most of them) incorrectly say it allows the officers to act with impunity, with no liability, with no repercussions. And that is flat out wrong.