Do you have

Qt Code:
  1. class QLineEdit;
To copy to clipboard, switch view to plain text mode 

before class definition?