Qt Widgets is often used in larger application, when a user interacion is required.
In these cases a QApplication begins and end his life cycle many times within the main application.
Now (Qt 6.2.2) the second run crash, but only when the mouse roll over the main window.
Using the user interface by keyboard (close using ALT+F4) it doesn't crash.
Affected/tested Qt versions:
- Qt 5.12.4 MinGW - works
- Qt 6.2.1 MinGW - crash
- Qt 6.2.1 MSVC - crash
- Qt 6.2.2 MinGW - crash
- Qt 6.2.2 Ubuntu - works
For our application it's a critical problem.
This is the minimum code that reproduce the bug (see attachment main.cpp)
|For Gerrit Dashboard: QTBUG-99319|
|387506,3||Windows: Don't crash in mouse handling when QApplication is recreated||dev||qt/qtbase||Status: MERGED||+2||0|
|387582,2||Windows: Don't crash in mouse handling when QApplication is recreated||6.3||qt/qtbase||Status: MERGED||+2||0|
|387583,2||Windows: Don't crash in mouse handling when QApplication is recreated||6.2||qt/qtbase||Status: MERGED||+2||0|