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

QByteArray QVariant::toByteArray (  )  const

Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QString::fromAscii()); otherwise returns an empty byte array.

See also:
canConvert(), convert()

Definition at line 2127 of file qvariant.cpp.

Referenced by ClassWizard::accept(), QMimeData::data(), SvgTextObject::drawObject(), QSqlDriver::formatValue(), SvgTextObject::intrinsicSize(), QTextDocument::loadResource(), QScriptEngineDebugger::standardWindow(), and QMetaProperty::write().

    return qVariantToHelper<QByteArray>(d, ByteArray, handler);

Generated by  Doxygen 1.6.0   Back to index