Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Read multiple files async, parse and store in a QMap
zefex last edited by
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 a
QMap<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 the
Take a look at QtConcurrent::run() and the example linked there.