One would think that QDateTime::date() followed by QDate::year() could be easily found by reading further into the documentation at the link you posted.