示例源码:
#include
#include
#include
static QTextStream cout (stdout,QIODevice::WriteOnly);
#include
#include
#include void test()
{qDebug() << "HelloWorld-qdebug";cout << "Helloword-QTextStream" <toLower() : "<toUpper() : "<toInt() : "<toUInt() : "<toInt() base on 10 : "<toInt() base on 16 : "<toInt() base on 8 : "<toInt() base on 2 : "<toDouble() : "<toFloat() : "<id<name.c_str();QByteArray ba("HelloWorld");char *pBa = ba.data();qDebug() << pBa;qDebug() << *pBa;while (*pBa) {qDebug()<< "item of Array : " << *pBa;++pBa;}char *p = &ba.data()[5];qDebug() <"<"<"<