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

setTearOffEnabled() leading to crash

    XMLWordPrintable

Details

    • macOS, Windows
    • f0049873d (dev), ea50f0924 (6.5), c34af8f51 (6.6), 41389ce13 (tqtc/lts-6.2)

    Description

      Hello,

      We found a bug related to Tear Off Menu handling.

      If there are 3 levels of Menus that support tear off:

       * tear off first menu

      • tear of second level menu
      • close first menu
      • tear off third level menu

      This will crash the application

      This can be reproduced with Qt5 and Qt6.   It looks like that QTornOffMenu holds a reference to its previously opend torn off off parent. As the flag Qt::WA_DeleteOnClose is set for QTornOffMenu, this reference is invalid, after closing the menu.

      I attached a small sample program reproduces it. There is also small video showing steps to crash the example.

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            irfan.omair@digia.com Irfan Omair
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes