--- a/eric7/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py Sun May 16 20:07:24 2021 +0200 +++ b/eric7/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py Mon May 17 19:58:15 2021 +0200 @@ -23,12 +23,6 @@ import UI.PixmapCache -try: - MonospacedFontsOption = QFontDialog.FontDialogOption.MonospacedFonts -except AttributeError: - MonospacedFontsOption = QFontDialog.FontDialogOptions(0x10) -NoFontsOption = QFontDialog.FontDialogOptions(0) - class EditorHighlightingStylesPage(ConfigurationPageBase, Ui_EditorHighlightingStylesPage): @@ -355,9 +349,9 @@ style, substyle = self.__currentStyles() options = ( - MonospacedFontsOption + QFontDialog.FontDialogOption.MonospacedFonts if self.monospacedButton.isChecked() else - NoFontsOption + QFontDialog.FontDialogOption(0) ) font, ok = QFontDialog.getFont(self.lexer.font(style, substyle), self, "", options)