Late to the party, but my answer is as follows:
To insert a QED symbol:
Case 1: Last line of text is to be centre-aligned:
\hfill <last line of code> \hfill $\square$ Case 2: Centre-alignement is not required:
<last line of code> \hfill $\square$ This works inside any environment and even if the last line is an equation, in which case you have to use $\displaystyle <equation>$ instead of \[ \]
Or if you like, use \lozenge instead of $\square$ to have a different QED symbol.