[Tex/LaTex] Graph-like structures with Qtree

diagramsqtreetikz-qtree

The Qtree package is "a LaTeX package for drawing tree diagrams." Is it possible to draw simple graph-like diagrams with it, similar to the one depicted below? If not, should I resort to TikZ-qtree?

Best Answer

Here's one solution.

\documentclass{article}
\usepackage{tikz-qtree}
\begin{document}

\begin{tikzpicture}[sibling distance=1cm, every node/.style={font=\sffamily}]

\Tree [.PSPACE 
      [.PP  
        [.BQP 
            [.BPP  \edge[white]; {} \edge; \node[xshift=2cm] (P) {P}; ] ] 
            [.\node (NP) {NP}; ]]]
\draw (P.north) -- (NP.south);

\end{tikzpicture}
\end{document}

Update

I've changed the method of moving the P node so that it is centred correctly. (Output image has been put in an \fbox to show the image edges.)

output of code