From Qt documentation (QVariant::toDate () const):
This means the 'value' must be in form Qt::ISODate!If the type() is String, an invalid date will be returned if the string cannot be parsed as a Qt::ISODate format date.
Do you check that 'value.toDate().isNull()' returns FALSE?
For your remark: you should insert your code into code tag (button with sharp symbol)




Reply With Quote
Bookmarks