From d371c31a8f82cc1e93f5dee4dd9e88974199e564 Mon Sep 17 00:00:00 2001 From: cosven Date: Thu, 26 Oct 2023 19:50:09 +0800 Subject: [PATCH] gui: lyric font dialog may cause app crash --- feeluown/gui/uimain/lyric.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feeluown/gui/uimain/lyric.py b/feeluown/gui/uimain/lyric.py index 504ea143fb..e3c74f2139 100644 --- a/feeluown/gui/uimain/lyric.py +++ b/feeluown/gui/uimain/lyric.py @@ -343,7 +343,8 @@ def set_color(color): dialog.open() def show_font_dialog(self): - dialog = QFontDialog(self.font()) + dialog = QFontDialog(self.font(), self) + # Set WA_DeleteOnClose so that the dialog can be deleted (from self.children). dialog.setAttribute(Qt.WA_DeleteOnClose) dialog.currentFontChanged.connect(self.setFont) dialog.fontSelected.connect(self.setFont)