Its unlikely he hit a flush since UTG he wont be playing T9 nor anything worse, with the Q and J on the board that leaves him very few possible diamond combos. He is representing the flush, but could also be set of Jacks, I dont think he would bet flop and check turn with a set of Queens and a flush draw on the board. I think its either AK♦, JJ, AT♦, KT♦, or some medium pocket pair turned into a bluff like TT or 99. I think folding was the right play, If he is bluffing, he earned your money