1)QString赋值给char *
QString q_str;
char *str = q_str.toLatin1().data();
2)char [] 赋值给string
char str[20];
string str1(str);
3)char *赋值给QString
char *str;
QString q_str;
q_str += str;
本文共 230 字,大约阅读时间需要 1 分钟。
1)QString赋值给char *
QString q_str;
char *str = q_str.toLatin1().data();
2)char [] 赋值给string
char str[20];
string str1(str);
3)char *赋值给QString
char *str;
QString q_str;
q_str += str;
转载于:https://my.oschina.net/u/2311935/blog/373408