# Beamer: \qed at the end of align*

I finish a proof sketch on beamer slides with a formula, e.g.,

\begin{align*}
P\leq n^{-\alpha}
\end{align*}


How can I get a qed symbol at the end of this line?

Using \qed as well as \hfill\ensuremath{\square} puts the symbol right at the end of the formula. I can't use \qedheresince I am not in a proof environment. What other options are there?

Edit: barbara beeton's answer pointed my in the right direction. For future reference, here is a solution:

\newcommand{\xqedhere}[2]{%
\rlap{\hbox to#1{\hfil\llap{\ensuremath{#2}}}}}

\begin{align*}
P \leq n^{-\alpha} \xqed{5cm}
\end{align*}