Python Forum
PySide6 QFontDialog - bug or just me?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PySide6 QFontDialog - bug or just me?
#1
I have a qfontdialog that works ALMOST perfectly BUT I am having one issue.

When I first start the program I use
self.font = QFont()
self.font.setFamily("Sans")
self.font.setPointSize(15)

(and later)

        print("Font is", self.font)
        fdlg = QFontDialog()
        fdlg.setCurrentFont(self.font)
        fdlg.exec()
        font = fdlg.currentFont()
        if font:
            print("Change to", font)
            self.font = font
            Settings.fontFamily = self.font.family()
            Settings.fontSize = self.font.pointSize()
            self.getCaptionedImage()
[
The problem is that the dialog doesn't show any selected font (No line highlighted), But if I change to "Serif" then one is highlighted. If I run this and choose a diffferent font then when I reopen that font is highlighted. EXCEPT not if I choose "Sans Regular", that results in no selected font after I open a third time.

Seems like a bug where the system ignores Sans Regular but is it really?
Reply


Messages In This Thread
PySide6 QFontDialog - bug or just me? - by PatM - Jan-21-2023, 11:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PySide6 - Connect to DBus signal - Correct syntax Drexel 1 627 Dec-18-2023, 08:03 AM
Last Post: Drexel
  PySide6 Copy and Past from clipboard to QTableWedget zinho 6 1,226 Dec-07-2023, 10:10 PM
Last Post: zinho
Bug [PyQt] Dinamically adding widgets to layout [PySide6] carecavoador 2 1,438 Jun-19-2023, 12:57 PM
Last Post: carecavoador
  Pyside6 Larz60+ 7 2,959 Nov-28-2022, 07:25 PM
Last Post: Larz60+
  [PySide6] Load ui with UiLoader catlessness 6 8,795 Nov-24-2021, 02:17 PM
Last Post: catlessness

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020