Closed corranwebster closed 2 years ago
PyQt6 is using Python Enums for Qt Enum types, which means that you need to insert the Enum class name when referring to the Enum. See https://stackoverflow.com/questions/66235661/how-to-check-mousebuttonpress-event-in-pyqt6 for example.
Enum
So this means something like QEvent.Close becomes QEvent.Type.Close. This is a change with huge impacts in many places , but the construct is compatible with other Qt versions that we care about (PySide2, PySide6, PyQt5).
QEvent.Close
QEvent.Type.Close
PyQt6 is using Python
Enum
s for Qt Enum types, which means that you need to insert theEnum
class name when referring to the Enum. See https://stackoverflow.com/questions/66235661/how-to-check-mousebuttonpress-event-in-pyqt6 for example.So this means something like
QEvent.Close
becomesQEvent.Type.Close
. This is a change with huge impacts in many places , but the construct is compatible with other Qt versions that we care about (PySide2, PySide6, PyQt5).