You ignored my question about setting a breakpoint to determine if your Widget::mousePressEvent is even being called. You can change the code all you want, but until you can confirm the method is being executed, you're wasting your time.
Also, the way you changed your code is not very efficient. Why would you duplicate the code like that? How about something like:
Before you respond and tell me that it's not working, please confirm your Widget::mousePressEvent is being executed.Qt Code:
if (event->button() & (Qt::LeftButton | Qt::RightButton))To copy to clipboard, switch view to plain text mode
Bookmarks