mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More pyqt6 enum goodness
This commit is contained in:
parent
e415463168
commit
9a6cb80fe4
@ -644,7 +644,7 @@ class WordsModel(QAbstractTableModel):
|
||||
except IndexError:
|
||||
pass
|
||||
elif role == Qt.ItemDataRole.InitialSortOrderRole:
|
||||
return Qt.SortOrder.DescendingOrder if section == 1 else Qt.SortOrder.AscendingOrder
|
||||
return (Qt.SortOrder.DescendingOrder if section == 1 else Qt.SortOrder.AscendingOrder).value # https://bugreports.qt.io/browse/PYSIDE-1974
|
||||
elif role == Qt.ItemDataRole.TextAlignmentRole:
|
||||
return int(Qt.AlignmentFlag.AlignVCenter | self.alignments[section]) # https://bugreports.qt.io/browse/PYSIDE-1974
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user