The realm of the 5 series' and the films, no. But Q and Spock did appear in a couple of audiobooks named, aptly Spock Vs Q, but these are considered non-canon.
There were rumors in some forums that the "squire of gothos" was a Q.
Read "Q Squared" it has lots of crossovers between various timelines.
There is a theory among fandom that Trelane, the Squire of Gothos (ST:TOS "The Squire of Gothos") was of the Q.