//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.
QString str= QString(*inBuffer[1]); ui->counter->setText(str);
Re: Char array to QStringperson P; strcpy (P.name,"TESTNAME"); QString MYstring(P.name);
Possible Duplicate:
QString to char conversion
I have a function (fopen in STL) that gives a char* argument as a path in my computer, but I must use QString in that place so it doesn't work.
How can I convert QString to char* to solve this problem?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With