- 
    Bug 
- 
    Resolution: Done
- 
    P2: Important 
- 
    5.0.0
- 
    None
- 
    Windows 7, Qt 5.0, MSVC 2010.
If you create a QMenu as a popup menu whose parent is a dialog and add a submenu to the QMenu, the system will crash when you mouse over or click on the submenu. This crash is new in QT 5.0 - the same code doesn't cause a problem in 4.8. See the attached .zip file for a simple project that demonstrates the problem.
void Dialog::buttonClicked()
{
    QMenu menu(this);
    menu.addMenu("Expanding this crashes");
    menu.addMenu("So does this");
    menu.exec(QCursor::pos()); //crash occurs inside 'exec()'
}