Qt 6.11 is out! See what's new in the release
blog
Read multiple files async, parse and store in a QMap
-
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@valuepair) 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.