Код: Выделить всё
QtCore.Qt.ItemDataRole.UserRole
Код: Выделить всё
QtCore.QEvent.Type.User
Код: Выделить всё
myType = QtCore.QEvent.Type.User + 1
Код: Выделить всё
from PySide6.QtCore import QEvent
class MyEvent(QEvent):
def __init__(self) -> None:
super().__init__(QEvent.Type.User + 1)
Код: Выделить всё
No overloads for "__init__" match the provided argumentsPylancereportCallIssue
QtCore.pyi(2756, 9): Overload 2 is the closest match
Argument of type "int" cannot be assigned to parameter "type" of type "Type" in function "__init__"
"int" is not assignable to "Type"PylancereportArgumentType
Подробнее здесь: https://stackoverflow.com/questions/793 ... stom-types