Closed jgrichard closed 2 years ago
Setting font point size does not seem to work. Removing the apply_stylesheet call will show the font in the correct size.
import sys from PySide6 import QtWidgets, QtCore, QtGui from qt_material import apply_stylesheet, add_fonts if __name__ == '__main__': app = QtWidgets.QApplication() font = QtGui.QFont() font.setPointSize(32) label = QtWidgets.QLabel('Test') label.setFont(font) label.show() apply_stylesheet(window, 'dark_cyan.xml') app.exec() sys.exit()
To set the font on the widget, you can remove font-size from material.css.template and then the .setFont() call will function as expected.
font-size
material.css.template
.setFont()
Setting font point size does not seem to work. Removing the apply_stylesheet call will show the font in the correct size.