Texas hold'em flush Tie or Not?
Your opponent won the pot.

The fact that there's a flush on the table isn't relevant to whether or not your pocket cards matter. Each player creates the best 5-card hand that he can out of the total 7 cards (2 pocket cards plus 5 table cards). While it is possible that the best 5-card hand is the 5 table cards, that is not the case here.

The best 5-card hand that you could make was Q♠-J♠-8♠-7♠-6♠, and the best 5-card hand that your opponent could make was Q♠-J♠-10♠-8♠-6♠. Your opponent's resulting 5-card hand was better than yours. You both had a flush, so you look at the highest card you each had. This was a tie, so you look at the second-highest card. Still a tie, so you look at the third-highest. Your opponent's third-highest was an 10, while yours was an 8, so he wins.