code: def dt_to_qdatetime(dt):
      
      return QtCore.QDateTime(QtCore.QDate(dt.year, dt.month, dt.day),
                              QtCore.QTime(dt.hour, dt.minute, dt.second))
docs: Convert a python datetime.datetime object to QDateTime
  
      :param dt: the datetime object
      :type dt: :class:`datetime.datetime`
      :returns: the QDateTime conversion
      :rtype: :class:`QtCore.QDateTime`
      :raises: None