Look at your if statement and figure out why the following statement works for the left button but not the right:
Your if statement reads as:Qt Code:
if(event->button()==Qt::LeftButton || Qt::RightButton)To copy to clipboard, switch view to plain text mode
- If the button for this event == Qt::LeftButton or
- Qt::RightButton is true or non-zero (note how I didn't mention the button?)
Figure out why and you have solved your problem.
Bookmarks