And you will also need
Qt Code:
  1. QT += widgets
To copy to clipboard, switch view to plain text mode 
to add the widget library

Cheers,
_