Ensure Qt doesn't prevent quit due to ignored widget close events
This commit is contained in:
parent
198528f79f
commit
5e3e9ba824
|
@ -255,7 +255,10 @@ void Sandbox::setupScreenScale() {
|
|||
Sandbox::~Sandbox() = default;
|
||||
|
||||
bool Sandbox::event(QEvent *e) {
|
||||
if (e->type() == QEvent::Quit && !Quitting()) {
|
||||
if (e->type() == QEvent::Quit) {
|
||||
if (Quitting()) {
|
||||
return QCoreApplication::event(e);
|
||||
}
|
||||
Quit(QuitReason::QtQuitEvent);
|
||||
e->ignore();
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue