To me the proper way of doing what the thread author wants is:
Qt Code:
if(e->buttons() & (Qt::LeftButton|Qt::RightButton)) doSomething(); else baseClass::mousePressEvent(e); }To copy to clipboard, switch view to plain text mode
One might also use == instead of & depending on the effect one wants to obtain.
Bookmarks