You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you do something like this redefining QAbstractItemModel.data():
def data(self, index, role):
if role == TextAlignmentRole:
return AlignBottom # it works
return AlignRight # it also works
return AlignBottom|AlignRight # it doesn't work
# you must do this:
return int(AlignBottom|AlignRight) # it now works
I think it's due to the fact that:
print AlignBottom|AlignRight
#: <Alignment object at 0x7f7c70093210>
Since AlignBottom|AlignRight generates an Alignment object, it's not well digested as a return type for QAbstractItemModel.data(index, TextAlignmentRole).
Until this issue is fixed, a simple cast to int will bypass this bug.
The text was updated successfully, but these errors were encountered:
If you do something like this redefining QAbstractItemModel.data():
I think it's due to the fact that:
Since AlignBottom|AlignRight generates an Alignment object, it's not well digested as a return type for QAbstractItemModel.data(index, TextAlignmentRole).
Until this issue is fixed, a simple cast to int will bypass this bug.
The text was updated successfully, but these errors were encountered: