Qt6 Splitting a QString

  c++, qt6

The issue comes with reading a CSV file that is seperated by commas, as well as having embedded commas in quotes. Example:

example.csv
this is a pole,"made by: you, me",quantity:1
this is a pole, made by: me,quantity:2

What I am trying to do is make it where at a click off a button, it opens example.csv and another csv file with prices or quantities and edit the example.csv. Ive tried split() bc I read you can use a string as parameter of split, and tried adding a * after the commas that are seperators, and pass ",*" as the parameter..however it still splits at embedded commas.

What would be the best approach to make this work?

Source: Windows Questions C++

LEAVE A COMMENT