From 7a24530ec8984bd0559eb0175fd0401e6fef347b Mon Sep 17 00:00:00 2001 From: Shaowen Yin Date: Thu, 26 Oct 2023 19:50:52 +0800 Subject: [PATCH] gui: lyric font dialog may cause app crash (#734) --- 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)