Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141851

Windows: Reg->6.5[?] [Qt]: Fonts are not displayed correctly anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.9.3
    • GUI: Font handling
    • None
    • Windows

      Steps to reproduce

      See Screenshots and C++ example qt_fonts.zip

      Original PySide report

      I updated python from 3.11 to 3.13 and pyside6 version had to be updated too (from 6.4.0.1 to >= 6.8). But I had a bad surprise because the fonts were not displayed as well as before. I tried pretty much all pyside versions compatible with python 3.13, and none of them seemed to work. It seems that the change in display was introduced after 6.7, but versions <= 6.7 are not compatible with python 3.13.

       

      Here is a screeshot of the rendering with python 3.13 (left) and 3.11 (right):

      Here is the code to generate it:

      import sys
      
      from PySide6.QtWidgets import QApplication, QLabel, QMainWindow, QPushButton, QVBoxLayout, QWidget
      
      
      class SimpleWindow(QMainWindow):
          def __init__(self):
              super().__init__()
              self.setGeometry(100, 100, 400, 100)
      
              central_widget = QWidget()
              self.setCentralWidget(central_widget)
              main_layout = QVBoxLayout(central_widget)
              export_html_btn = QPushButton("Generate a PDF report")
              label = QLabel("Générer un rapport sur les tests validés")
              main_layout.addWidget(label)
              main_layout.addWidget(export_html_btn)
      
      
      if __name__ == "__main__":
          app = QApplication(sys.argv)
          stylesheet = """QPushButton {
              font-family: Segoe UI Variable;
              font-size: 14px;
              font-weight: 700;
              text-align: center;
          }
          QLabel {
              font-family: Segoe UI Variable;
              font-size: 14px;
              font-weight: 700;
              text-align: center;
              color: white;
              background-color: #098487;
              padding: 10px;
          }
          """
          app.setStyleSheet(stylesheet)
          window = SimpleWindow()
          window.show()
          sys.exit(app.exec())

      Thank you very much for your help.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            pj_127 Pierre-Jean Arduin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes