It's some kind of loop in which clicking 'OK' results calling fc_client::closeEvent() which reopens the dialog.
Attempt to trivially cut the loop in fc_client::closeEvent() ended in segfault (but I don't know if it's really related, or does the code just continue to another problem). There's no debugger at my Qt6 testing virtual machine at the moment.
Qt-client built against Qt6 (--with-qt6), does not quit. It brings up the "Quit?" confirmation dialog, but clicking 'OK' from it does nothing. Even after clicking 'OK' (repeatedly) one can click 'Cancel' to return to the game.