Answers for "qstring to char array"

0

qstring to char array

QString str1 = "Test";
  QByteArray ba = str1.toLocal8Bit();
  const char *c_str2 = ba.data();
  printf("str2: %s", c_str2);
Posted by: Guest on June-07-2021

Browse Popular Code Answers by Language