Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

QDateTime QVariant::toDateTime (  )  const

Returns the variant as a QDateTime if the variant has type() DateTime, Date, or String; otherwise returns an invalid date/time.

If the type() is String, an invalid date/time will be returned if the string cannot be parsed as a Qt::ISODate format date/time.

See also:
canConvert(), convert()

Definition at line 2034 of file qvariant.cpp.

Referenced by Q3DataTable::fieldToString(), QSqlDriver::formatValue(), QSortFilterProxyModel::lessThan(), and QStandardItem::operator<().

    return qVariantToHelper<QDateTime>(d, DateTime, handler);

Generated by  Doxygen 1.6.0   Back to index