added mechanic for deleting a BaseWindow on focus out

This commit is contained in:
fourtf
2018-07-05 10:34:04 +02:00
parent 335cbf8758
commit f02a89690e
5 changed files with 60 additions and 44 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ Window::Window(WindowType _type)
update->setPixmap(QPixmap(":/images/download_update.png"));
QObject::connect(update, &TitleBarButton::clicked, this, [this, update] {
auto dialog = new UpdatePromptDialog();
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->setActionOnFocusLoss(BaseWindow::Delete);
dialog->move(update->mapToGlobal(QPoint(-100 * this->getScale(), update->height())));
dialog->show();
dialog->raise();