fix unexpected close when launch external app (#2617)
* fix unexpected close when launch external app * update
This commit is contained in:
@@ -411,6 +411,12 @@ void Flameshot::exportCapture(QPixmap capture,
|
||||
if (!(tasks & CR::UPLOAD)) {
|
||||
emit captureTaken(capture);
|
||||
}
|
||||
// hacks: close a window to trigger qt's quitOnLastWindowClose
|
||||
// if not create tmp_window and close, the `flameshot gui` won't exit after
|
||||
// click copy button
|
||||
QWidget* tmp = new QWidget();
|
||||
tmp->show();
|
||||
tmp->close();
|
||||
}
|
||||
|
||||
// STATIC ATTRIBUTES
|
||||
|
||||
Reference in New Issue
Block a user