Hi,

Change this line:
Qt Code:
  1. if(me->button() == Qt::RightButton)
To copy to clipboard, switch view to plain text mode 

In your statment
Qt Code:
  1. if(me->button() & Qt::RightButton)
To copy to clipboard, switch view to plain text mode 
You are asking if "me->button()" and "Qt::RightButton" are equal to 1(or true).