Example 7 Given $p, q, \frac{2q-1}{p}, \frac{2p-1}{q} \in \mathbf{Z}$, and $p>1, q>1$. Find the value of $p+q$.
Solution: Clearly, $p \neq q$.
(1) If $p>q$, then
$$
\begin{array}{l}
\frac{2 q-1}{p}<\frac{2 p-1}{p}<2 \Rightarrow \frac{2 q-1}{p}=1 \\
\Rightarrow p=2 q-1 .
\end{array}
$$

Thus $\frac{2 p-1}{q}=\frac{2(2 q-1)-1}{q}=4-\frac{3}{q} \in \mathbf{Z}$
$$
\Rightarrow q=3 \Rightarrow p=5 \Rightarrow p+q=8 \text {. }
$$
(2) If $p<q$, similarly to (1) we find $p+q=8$.