- const char * to QStringconst char *charstr = "charstring";
QString qstring = QString(QLatin1String(charstr)); - Integer to QStringint num = 10;
QString qstring = QString::number(num,10); - QString to const char *QString message = "test";
char * c_message = message.toLatin1().data(); - QByteArray to unsigned char *QByteArray message;
message.resize(5);
message[0] = 0xFF;
message[1] = 0xFE;
unsigned char * c_message = (unsigned char *)message.data();
沒有留言:
張貼留言