-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9.3
-
None
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.