Originally, you had
A LaTeX document can only have one class as the error says. But you can also load packages to extend the functionality of the class.
tikz-qtree is not a document class at all: it is a package. So, you want:
After correcting the problem above, you continued to report the same error. This was somewhat puzzling but AlanMunn held the key to this mystery.
As explained by AlanMunn in comments, the package
tikz-qtree loads a code file named
tikz-qtree.tex. Because your document was itself called
tikz-qtree.tex, LaTeX tried to read the document a second time when the package called the code file.
This happens because files in the current directory take precedence over those elsewhere, so LaTeX read your document
tikz-qtree.tex rather than the code file
Hence, it really did get two
\documentclass commands as input - they just both happened to be from the single instance in your document.
I don't know if there is a moral to this story other than that AlanMunn knows everything there is to know about packages which draw trees, but at least it dispels the mystery.