[proofplan]
We compare two pseudohermitian contact forms in the same conformal class, writing the second as $\widehat\theta=e^\Upsilon\theta$. The volume form rescales by the factor $e^{(n+1)\Upsilon}$, so the assumed transformation law converts the transformed total integral into the original total integral plus the pairing of $P_\theta\Upsilon$ with the constant function $1$. Formal self-adjointness moves $P_\theta$ onto $1$, and the hypothesis $P_\theta1=0$ kills the error term.
[/proofplan]
[step:Fix a conformal change and compute the pseudohermitian volume scaling]
Let $\Upsilon\in C^\infty(M;\mathbb R)$ and define the rescaled contact form
\begin{align*}
\widehat\theta:M\to T^*M,\qquad x\mapsto e^{\Upsilon(x)}\theta_x.
\end{align*}
Here $T^*M$ is the real cotangent bundle specified in the theorem statement. Let $\mu_{\widehat\theta}$ denote the smooth measure induced by $\widehat\theta\wedge(d\widehat\theta)^n$. Since
\begin{align*}
d\widehat\theta=d(e^\Upsilon\theta)=e^\Upsilon(d\Upsilon\wedge\theta+d\theta),
\end{align*}
we have
\begin{align*}
\widehat\theta\wedge(d\widehat\theta)^n
=
e^{(n+1)\Upsilon}\theta\wedge(d\Upsilon\wedge\theta+d\theta)^n.
\end{align*}
In the binomial expansion of $(d\Upsilon\wedge\theta+d\theta)^n$, every term containing $d\Upsilon\wedge\theta$ vanishes after wedging with the leading factor $\theta$, because $\theta\wedge\theta=0$. Hence
\begin{align*}
\widehat\theta\wedge(d\widehat\theta)^n
=
e^{(n+1)\Upsilon}\theta\wedge(d\theta)^n.
\end{align*}
Equivalently, the induced measures satisfy
\begin{align*}
d\mu_{\widehat\theta}(x)=e^{(n+1)\Upsilon(x)}\,d\mu_\theta(x).
\end{align*}
[guided]
We first isolate the only geometric calculation needed in the proof: how the pseudohermitian volume changes under a conformal rescaling. The rescaled contact form is the smooth one-form
\begin{align*}
\widehat\theta:M\to T^*M,\qquad x\mapsto e^{\Upsilon(x)}\theta_x.
\end{align*}
Using the product rule for the [exterior derivative](/theorems/1525) gives
\begin{align*}
d\widehat\theta=d(e^\Upsilon\theta)=e^\Upsilon(d\Upsilon\wedge\theta+d\theta).
\end{align*}
Therefore
\begin{align*}
\widehat\theta\wedge(d\widehat\theta)^n
=
e^\Upsilon\theta\wedge e^{n\Upsilon}(d\Upsilon\wedge\theta+d\theta)^n
=
e^{(n+1)\Upsilon}\theta\wedge(d\Upsilon\wedge\theta+d\theta)^n.
\end{align*}
The reason only the pure $(d\theta)^n$ term survives is that every other term in the binomial expansion contains at least one factor $d\Upsilon\wedge\theta$. After wedging with the leading $\theta$, such a term contains $\theta\wedge\theta$, which is zero by alternatingness of the exterior product. Thus
\begin{align*}
\widehat\theta\wedge(d\widehat\theta)^n
=
e^{(n+1)\Upsilon}\theta\wedge(d\theta)^n.
\end{align*}
Since $\mu_\theta$ and $\mu_{\widehat\theta}$ are the measures induced by these smooth volume forms, this identity of volume forms is exactly the measure identity
\begin{align*}
d\mu_{\widehat\theta}(x)=e^{(n+1)\Upsilon(x)}\,d\mu_\theta(x).
\end{align*}
[/guided]
[/step]
[step:Rewrite the transformed total Q-curvature using the transformation law]
The transformation law gives the pointwise identity
\begin{align*}
e^{(n+1)\Upsilon(x)}Q_{\widehat\theta}(x)=Q_\theta(x)+(P_\theta\Upsilon)(x)
\end{align*}
for every $x\in M$. Using the measure-scaling identity from the previous step, we obtain
\begin{align*}
\int_M Q_{\widehat\theta}\,d\mu_{\widehat\theta}(x)
=
\int_M Q_{\widehat\theta}(x)e^{(n+1)\Upsilon(x)}\,d\mu_\theta(x).
\end{align*}
Substituting the transformation law into the integrand gives
\begin{align*}
\int_M Q_{\widehat\theta}\,d\mu_{\widehat\theta}(x)
=
\int_M Q_\theta\,d\mu_\theta(x)
+
\int_M P_\theta\Upsilon\,d\mu_\theta(x).
\end{align*}
[/step]
[step:Use formal self-adjointness and $P_\theta1=0$ to cancel the error term]
Formal self-adjointness of $P_\theta$ with respect to $\mu_\theta$ means that for all $f,g\in C^\infty(M;\mathbb R)$,
\begin{align*}
\int_M (P_\theta f)g\,d\mu_\theta(x)
=
\int_M f(P_\theta g)\,d\mu_\theta(x).
\end{align*}
Apply this identity with $f=\Upsilon$ and $g=1$. Since $P_\theta1=0$, we get
\begin{align*}
\int_M P_\theta\Upsilon\,d\mu_\theta(x)
=
\int_M (P_\theta\Upsilon)1\,d\mu_\theta(x)
=
\int_M \Upsilon(P_\theta1)\,d\mu_\theta(x)
=
0.
\end{align*}
[/step]
[step:Conclude equality for all contact forms in the conformal class]
Combining the previous two steps yields
\begin{align*}
\int_M Q_{\widehat\theta}\,d\mu_{\widehat\theta}(x)
=
\int_M Q_\theta\,d\mu_\theta(x).
\end{align*}
Because $\Upsilon\in C^\infty(M;\mathbb R)$ was arbitrary, every contact form in the pseudohermitian conformal class of $\theta$ has the same total CR Q-curvature. This proves the claimed invariance.
[/step]