Details
Description
The following code will fail because QFont.setStyleStrategy cannot take an int.
from PySide2 import QtGui, QtWidgets app = QtWidget.QApplication([]) fdb = QtGui.QFontDatabase() font = fdb.font("Arial", "Regular", app.font().pointSize() + 1) # Works font.setStyleStrategy(QtGui.QFont.PreferAntialias) # Works font.setStyleStrategy(QtGui.QFont.PreferQuality) # Breaks font.setStyleStrategy(QtGui.QFont.PreferAntialias | QtGui.QFont.PreferQuality)
The bitwise OR of PreferAntialias and PreferQuality returns the int 192.
To get it to work I think I can just instantiate a QFont.StyleStrategy with the result of the OR but it would be nice if this op could be implemented.
Attachments
Issue Links
- relates to
-
PYSIDE-168 QtCore.Alignment objects are not correctly interpreted when returned from item.data()
- Closed