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
For Gerrit Dashboard: PYSIDE-628 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
449023,2 | PyEnum: Fix a case where Enum is used instead of Flag | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
449114,2 | PyEnum: Fix a case where Enum is used instead of Flag | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |