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

const char * QByteArray::constData (  )  const [inline]

Returns a pointer to the data stored in the byte array. The pointer can be used to access the bytes that compose the array. The data is '\0'-terminated. The pointer remains valid as long as the byte array isn't reallocated.

This function is mostly useful to pass a byte array to a function that accepts a {const char *}.

Note: A QByteArray can store any byte values including '\0's, but most functions that take {char *} arguments assume that the data ends at the first '\0' they encounter.

See also:
data(), operator[]()

Definition at line 369 of file qbytearray.h.

Referenced by QAccessibleWidget::addControllingSignal(), QCryptographicHash::addData(), QString::append(), QCoreApplication::applicationFilePath(), QObject::connect(), QDBusConnection::connectToBus(), QAbstractSocket::connectToHost(), QAbstractSocket::connectToHostImplementation(), QEucKrCodec::convertFromUnicode(), QSjisCodec::convertFromUnicode(), QGb2312Codec::convertFromUnicode(), QEucJpCodec::convertFromUnicode(), QTsciiCodec::convertFromUnicode(), QGbkCodec::convertFromUnicode(), QGb18030Codec::convertFromUnicode(), QBitArray::count(), Q3ColorDrag::decode(), QPainter::drawText(), QSqlQuery::exec(), QDropEvent::format(), QImage::fromData(), fromHex(), QHostInfo::fromName(), QUrl::fromPercentEncoding(), QUrl::fromPunycode(), QXmlInputSource::fromRawData(), QByteArrayMatcher::indexIn(), QNativeSocketEngine::initialize(), QMetaObject::invokeMethod(), QMetaEnum::keysToValue(), Q3CString::leftJustify(), QFSFileEngine::link(), QTcpServer::listen(), QPixmap::loadFromData(), QImage::loadFromData(), QBitArray::operator &=(), QString::operator!=(), operator!=(), QString::operator+=(), operator<(), QString::operator<(), QTextStream::operator<<(), QString::operator<=(), operator<=(), QString::operator=(), QString::operator==(), operator==(), operator>(), QString::operator>(), QString::operator>=(), operator>=(), QBitArray::operator^=(), QBitArray::operator|=(), QBitArray::operator~(), QIODevice::peek(), QSqlQuery::prepare(), QString::prepend(), QTest::qCompare(), qCompress(), QDBusError::QDBusError(), QDBusServer::QDBusServer(), QLock::QLock(), qUncompress(), qvsnprintf(), Q3Process::readLineStderr(), Q3Process::readLineStdout(), QFSFileEngine::rename(), Q3CString::replace(), replace(), Q3CString::rightJustify(), QPainter::setFont(), QColor::setNamedColor(), QByteArrayMatcher::setPattern(), QPrinter::setPrinterName(), QFont::setRawName(), QWidget::setWindowRole(), QBitArray::size(), Q3CString::sprintf(), Q3Process::start(), QBitArray::testBit(), toDouble(), Q3CString::toDouble(), Q3CString::toLong(), toLongLong(), QUrl::toPercentEncoding(), QString::toStdString(), QTest::toString(), Q3CString::toULong(), toULongLong(), QTextCodec::toUnicode(), QTextDecoder::toUnicode(), QString::toUtf8(), QDoubleValidator::validate(), QIntValidator::validate(), QIODevice::write(), and QUdpSocket::writeDatagram().

{ return d->data; }


Generated by  Doxygen 1.6.0   Back to index