QString str;
str=ui->lineEdit->text();
char *s1=(char *)malloc(1024);
strcpy(s1,(const char *)str);
str=strreplace(s1,"aaa","dd");
ui->textEdit->append(str);
ui->lineEdit->setText("");
由于strcpy是c库函数
这里报错 error: cannot convert `str' from type `QString' to type `const char*'
如果将QString类型的数据 转换成一个char 的指针?