Important: Please read the Qt Code of Conduct -

QtConcurrent for double loops ?

  • Hi,

    I am new to Qt Multithreading features, & I used to discover the QtConcurrent class which sounds great to let a heavy algorithm be computed in background.

    Does the MapFunction has the ability to access any other element of the map which is not the one currently accessed ? Because my algorithm is a double loop :

    @foreach(k in container)
    foreach(j (!= k) in container)
    make temporary data
    update k according to temporary data

    Is there a way to deal with that using QtConcurrent ? Every elements should be accessed by another class to render the view, allowing the user to see the algorithm being processed in real time.

  • Ok sorry I didn't read the Qt Threading Basics documentation before looking for examples, it's done now, (really well explained), I have all the informations, QThread emiting results as signals is the best solution I guess.

Log in to reply