The example below crashes eventually after some time when objects are cleaned up. I haven't found a way to force the crash directly in a simple script. When the DateEdit is used in a module, it crashes instantly when the module window is opened.
from PythonQt.QtCore import Qt, QDate, QDateTime, QTime
from PythonQt.QtGui import QDateEdit
class DateEdit(QDateEdit):
def textFromDateTime(self, dt: QDateTime) -> str:
return QDateEdit.textFromDateTime(self, dt)
d = DateEdit()
d.setDate(QDate(2000, 5, 5))
print(d.date.isValid())
It also crashes when I return an empty string instead of calling "QDateEdit.textFromDateTime"