This has happened for every QDialog I pop that fires from either a mouseReleaseEvent on a QGraphicsItem or from a QContextMenu. I don’t see what the issue is – the code is pretty simple..
...
void MyQGfxItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
if(event->button() == Qt::RightButton)
{
MyDialog someDlg;
if(someDlg.exec())
{
}
}
}
...
As soon as the dialog is closed, either through OK or Cancel, an empty context menu appears where the event was triggered:

The blank item seems to control if my QDockWidget is hidden or visible.. Any idea what is going on? Numerous Google searches has left me stuck.
Edit – it looks like this only occurs if the Right mouse button is used..
Ha! Got it. It looks like the QMainWindow grabs Right-click events after everything is finished. Calling this->setContextMenuPolicy(Qt::NoContextMenu) in the QMainWindow suppressed it.