79655981

Date: 2025-06-06 13:14:05
Score: 1
Natty:
Report link

In python pyQT5 or PySide6, don't use setText or UserRole

d=QDateTime.fromString("2025-06-02 15:25:55", "yyyy-MM-dd HH:mm:ss")
item.setData(i, Qt.DisplayRole,d)

Work also with QDate object
For C users of QT, you can easily convert :)

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Las Car