Read multiple files async, parse and store in a QMap
Unsolved
General and Desktop
-
I have a folder with multiple text files, I wanted to open them all, read the content async (more than one at the same time - to speed things up), parse it (look for something using regex - its a
key@value
pair) and store in aQMap<QString, QString>
. The regex I already have(?<key>[\w0-9]+)@(?<value>[\w0-9]+)
, I only need to know how to do the multiple file opening and reading so I can parse and store in theQMap
. -
Take a look at QtConcurrent::run() and the example linked there.