Example 1 Find the solution set of the following inequality about $x$: $a^{2} x+b^{2}(1-x) \geqslant[a x+b(1-x)]^{2}$
Solve the inequality: $a^{2} x+b^{2}(1-x) \geqslant a^{2} x^{2}+2 a b(1-x) x+b^{2}(1-x)^{2}$

Rearranging and combining terms, we get $(a-b)^{2} x^{2}-(a-b)^{2} x \leqslant 0$

That is, $(a-b)^{2}(x-1) x \leqslant 0$

Therefore, when $a=b$, $x \in \mathbf{R}$

When $a \neq b$, we have $(x-1) x \leqslant 0 \Rightarrow 0 \leqslant x \leqslant 1$

Thus, the solution set of the inequality is: when $a=b$, it is the set of real numbers $\mathbf{R}$; when $a \neq b$, it is $[0,1]$.