Season's Greetings (I guess this works any time of the year).

I'm using Qt 4.4.2 on a Windows platform and need to do an unconventional drag & drop.

Left AND right mouse button drags between two QTableWidgets are allowed. When releasing the buttons in the target table, the LMB does the add/overwrite but the RMB must display a context menu to allow the user to pick specific actions.

My normal handling of the mouseReleaseEvent shows one context menu but the mouse release of a RMB drop should show a different menu. I believe I can handle the menu item switching with setVisible() calls.

The issue here is that in my dropEvent() handler I can determine which button was used for the drag...
Qt Code:
  1. if ( event->mouseButtons() & Qt::RightButton )
  2. // display context menu
To copy to clipboard, switch view to plain text mode 
...but I don't know how to display a context menu at this point when the RMB is released. Can someone point me in the right direction to display a context menu from within the drop event handler?