hi! all, I was tryin to convert a QSting to char* type but by following methods,but those does'nt seem to work.
// QLineEdit *line=new QLineEdit();{just to describe what is line here}
QString temp=line->text();
char *str=(char *)malloc(10);
QByteArray ba=temp.toLatin1();
strcpy(str,ba.data());
can you elobrate the possible flaw with this method ,or tell alternative method.