To make text selectable in Quick Look previews, you just need to enable a hidden Finder setting. Select and copy the code below, open Terminal (/Applications/Utilities), paste that code at the prompt, then press Return:
defaults write com.apple.finder QLEnableTextSelection -bool TRUE; killall Finder
After a second or two, the Finder will restart. Once it does, you’ll be able to select text in Quick Look previews and copy it to the Clipboard for use elsewhere.
If you decide you don’t deserve to select text in Quick Look, you can turn this feature off with another Terminal command:
defaults delete com.apple.finder QLEnableTextSelection; killall Finder
[There’s an improvement.]