View Single Post
Old 01-04-2022, 06:11 AM   #43
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,590
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@davidfor: That's a bug in PyQt6. Just use the literal 1000 it should work in both. Or if you want to be elegant:

Code:
try:
    MyType = QTableWidgetItem.ItemType.UserType.value
except AttributeError:
    MyType = QTableWidgetItem.UserType
Sadly, Phil decided to move PyQt to using python enums in PyQt6 and caused endless bugs and breakage in the process. There are literally hundreds of commits I've had to make to fix all the breakage this decision has caused.
kovidgoyal is offline   Reply With Quote