Hello, guys. At first, sorry for my bad english...

For my purposes I was created widget kinda "date picker", based on model/view architecture. Widget haves the next structure (for example):
Qt Code:
  1. 2000
  2. January
  3. 1
  4. 2
  5. 3
  6. ...
  7. February
  8. 1
  9. 2
  10. 3
  11. ...
  12. Other months...
  13. 2001
  14. January
  15. 1
  16. ...
  17. 2002
  18. 2003
  19. ...
  20. etc
To copy to clipboard, switch view to plain text mode 

User can pick a date. Not just a day, he can also pick a month, or a year.
It's so easy to get data of the selected item, just
Qt Code:
  1. value = model->data(treeWidget->currentIndex(), Qt::DisplayRole);
To copy to clipboard, switch view to plain text mode 
but how to get the parent of the selected item? In case when user selected a month or a day, we need to know, for which year belongs this month (or for which year and month belongs this day).
So, I need help How to get data of the parent of the selected item?