The Qt::ISODate format is YYYY-MM-DD for dates.
If you default the value to a date like above then the code that you used:
return value.toDate().toString(m_dateFormat);
return value.toDate().toString(m_dateFormat);
To copy to clipboard, switch view to plain text mode
is correct, but if you default it in another form you should use a code like this one:
//myDateFormat is of type 'Qt::DateFormat' and is same as
//the date format that you use for filling date cells.
return QDate::fromString ( value.
toString(), myDateFormat
);
//myDateFormat is of type 'Qt::DateFormat' and is same as
//the date format that you use for filling date cells.
return QDate::fromString ( value.toString(), myDateFormat);
To copy to clipboard, switch view to plain text mode
Bookmarks