Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Read multiple files async, parse and store in a QMap
Forum Updated to NodeBB v4.3 + New Features

Read multiple files async, parse and store in a QMap

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 358 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zefex
    wrote on last edited by
    #1

    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 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 QMap.

    1 Reply Last reply
    1
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Take a look at QtConcurrent::run() and the example linked there.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      5

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved