Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

qstring to char*

int main(int argc, char **argv)
{
 QApplication app(argc, argv);
  QString str1 = "Test";
  QByteArray ba = str1.toLocal8Bit();
  const char *c_str2 = ba.data();
  printf("str2: %s", c_str2);
  return app.exec();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #qstring
ADD COMMENT
Topic
Name
8+9 =