Qt6 build: close scene and discard modifications is ignored

I am experimenting with using Slicer built with Qt6 on Arch Linux on a daily basis.

When a scene is closed, the SaveBeforeClosingScene appears. When the Close scene (discard modifications) button is clicked, the scene is not closed as it happens with Qt5 builds. Instead, the SaveSceneAndUnsavedData dialog appears. The only way to close the scene and discard modifications is to uncheck all items and click the Save button.

That’s a manageable annoyance, I just wish to bring it to your attention.

For precision, Slicer is built with Qt 6.10.2 (to build CTK successfully) and runs equally with 6.10.2 and with system 6.11.1.