Qt Code:
value = item->data(); if (item_parent) ....To copy to clipboard, switch view to plain text mode
I suggest not to use the "DisplayRole" here.
I would add a custom role for each item that contains the QDate so you don't have to build up dates from displayed data. Maybe another role that tells you if it is a year/month/day item.
(You just have to figure out how you represent months and so on (a QDate can't have a day value of 0.)
HTH
Bookmarks