Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-29480

QMenu::exec crashes when accessing submenus.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.1
    • 5.0.0
    • None
    • Windows 7, Qt 5.0, MSVC 2010.

    Description

      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()'
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bachewii Jens
            chris.tenbrink@chiefarchitect.com Chris Tenbrink
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes