-1

I am trying to parse QString with following code:

QString name = "name.bin";
QStringList imgName = name.split(".");
qDebug() << imgName.at(0); // result is "name"

However I need just name without any ("). Then I write another code to manually delete quotes("").

Is there any easy way to split QString?

goGud
  • 4,163
  • 11
  • 39
  • 63

1 Answers1

2

There are no " " in the string. It just contains Name

qDebug() << (imgName.at(0))[0]; // result is n
Mellester
  • 922
  • 7
  • 9