Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.11, 6.2.7
-
-
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.