From dd9163ab9e1a7bd57a8cb11c40f54746e307d5ae 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/dtitlebar.cpp b/src/widgets/dtitlebar.cpp index c3a23a700..f96c85b61 100644 --- a/src/widgets/dtitlebar.cpp +++ b/src/widgets/dtitlebar.cpp @@ -1533,7 +1533,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 {