From fb82576b955ec94e182beb68f5106ee8acd51a3c Mon Sep 17 00:00:00 2001 From: wangfei Date: Sat, 23 Nov 2024 15:33:35 +0800 Subject: [PATCH] fix: exit animation of the application disappeared in treeland When clicking the close button, call the widget::close. Modify that calling dapplication::quit is the same as clicking the option to exit Log: --- src/widgets/dtitlebar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/dtitlebar.cpp b/src/widgets/dtitlebar.cpp index c3a23a700..09131cad0 100644 --- a/src/widgets/dtitlebar.cpp +++ b/src/widgets/dtitlebar.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "dpalettehelper.h" @@ -1533,7 +1534,7 @@ void DTitlebar::setVisible(bool visible) connect(d->maxButton, SIGNAL(clicked()), this, SLOT(_q_toggleWindowState()), Qt::UniqueConnection); connect(this, SIGNAL(doubleClicked()), this, SLOT(_q_toggleWindowState()), Qt::UniqueConnection); connect(d->minButton, SIGNAL(clicked()), this, SLOT(_q_showMinimized()), Qt::UniqueConnection); - connect(d->closeButton, &DWindowCloseButton::clicked, d->targetWindow(), &QWidget::close, Qt::UniqueConnection); + connect(d->closeButton, SIGNAL(clicked(bool)), this, SLOT(_q_quitActionTriggered()), Qt::UniqueConnection); d->updateButtonsState(d->targetWindow()->windowFlags()); } else {