Try to keep QDateTime data type while setting the data for editing purpose (Qt::EditRole), and set the data for displaying (Qt::DisplayRole) with converted type (QString).
Edit: disable smilies
Try to keep QDateTime data type while setting the data for editing purpose (Qt::EditRole), and set the data for displaying (Qt::DisplayRole) with converted type (QString).
Edit: disable smilies
~ We are nothing in this universe ~
falconium (15th April 2011)
QVariant QStandardItem::data ( int role = Qt::UserRole + 1 ) const [virtual]
Returns the item's data for the given role, or an invalid QVariant if there is no data for the role.
Note: The default implementation treats Qt::EditRole and Qt::DisplayRole as referring to the same data.
Does it mean QStandardItem must be inherited to a new class that separates edit and display roles?
How can I do that if it is the case?
Thank you!
Bookmarks