Questions tagged [qtconcurrent]

QtConcurrent is a Qt framework namespace providing high-level multithreading APIs.

QtConcurrent namespace was introduced in Qt 4.4. The QtConcurrent namespace provides high-level APIs that make it possible to write multi-threaded programs without using low-level threading primitives such as mutexes, read-write locks, wait conditions, or semaphores.

As of Qt 4.8.0, it includes:

  • 2 Classes
  • 2 Types
  • and mostly Functions

As of Qt 5, it became a separate add-on module, and includes:

  • QtConcurrent namespace
  • QFuture
  • QFutureIterator
  • QFutureWatcher
  • QFutureSynchronizer

Details can be found on the following page.

Resources:

193 questions
0
votes
1 answer

boost::bind along with qtconcurrent::map ...can't seem to make it work

Well I require your assistance because I can't seem to find a way to make QtConcurrent::map work with my static function and my sequence of elements. Here is what I'm trying to do: I want to run this function : static void…
Lex
  • 413
  • 1
  • 7
  • 19
0
votes
1 answer

Qt QtConcurrent progressbar update

I have a QTableView connected to a QAbstractTableModel. The model is used with QtConcurrent::map to make threads for the application (copying files) I subclassed QStyledItemDelegate to display a QStyleOptionProgressBar in one of the tableviews…
0
votes
1 answer

Setting stack size for thread run with QtConcurrent

How to set stack size for thread run with QtConcurrent?
krzych
  • 2,126
  • 7
  • 31
  • 50
0
votes
1 answer

QProcess, QEventLoop - of any use for parallel-processing

I wonder whether I could use QEventLoop (QProcess?) to parallelize multiple calls to same function with Qt. What is precisely the difference with QtConcurrent or QThread? What is a process and an event loop more precisely? I read that…
kiriloff
  • 25,609
  • 37
  • 148
  • 229
0
votes
2 answers

Error with sequence argument when using QtConcurrent map

I'm trying to use QtConcurrent::map to run this function //This function is used through QtConcurrent::map to create images from a QString path void MainWindow::createQImage(QString* path) { //create an image from the given path QImage* t =…
jdjalm
  • 9
  • 1
-1
votes
1 answer

QtConcurrent::run() calling another class method

I am trying to use QTConcurrent class to launch some tasks asynchronously but I am getting some errors: This is my code: class A { public: void method1(); }; class B { std::unique_ptr ptr; public: void method2() { …
RuLoViC
  • 825
  • 7
  • 23
-1
votes
1 answer

C2064: term does not evaluate to a function taking 1 arguments QtConcurrent::map

I am trying to get a basic program implementing QtConcurrent to work. Found a lot of sites with similar problems, but none of their solutions worked for me so far. My code: void Setup::addOne(int &i) { ++i; } void Setup::Test() { QList
Ryan
  • 125
  • 1
  • 7
-1
votes
2 answers

QtConcurrent::run with overloaded static method

I just can't get QtConcurrent::run working with an overloaded static method: class Foobar { public: static ResType foo(const cv::Mat& data, const QStringList& names, int clusters = 5); static ResType foo(const cv::Mat& data, const…
Benjamin Maurer
  • 3,602
  • 5
  • 28
  • 49
-1
votes
1 answer

How can I use QtConcurrent::Run and QThread?

My code is about images. It can be open image, changing quality, resize, showing image size... For resize and change quaity, I use slider and when I change sliders values, image is read from buffer again and again. Because of this, freezing is…
doctor joe
  • 55
  • 1
  • 1
  • 6
-1
votes
1 answer

QtConcurrent::run() for a member function does not use the original instance

I want to use QtConcurrent::run() for a member function, but it seems that it doesn't use the pointer to the instance. Instead, it looks like the default constructor is called #include #include #include class Foo :…
B. Decoster
  • 7,723
  • 1
  • 32
  • 52
-2
votes
2 answers

how to run a membber function with QtConcurrrent Qt6? type 'decay_t cannot be used prior to '::' because it has no members)

i'm trying to run a member function but but i got an error , help me please i tried with this line of code QFuture future = QtConcurrent::run(this,&backD::analysa); and analysa() is a methode that returns a qlonglong
Aquiles
  • 13
  • 3
-2
votes
1 answer

How do you pass a string array into QtConcurrent::run?

In my program QtConcurrent Run does not accept my array of strings or my array of bools. Do I need to convert them into QByteArrays for the data to be passed in? According to the documentation this works: extern QString someFunction(const QByteArray…
BDD
  • 25
  • 1
  • 6
-2
votes
1 answer

Qt, keep GUI resposive after database call

Let's say when user clicks a button an (slow) operation is performed involving database access. The problem is that the GUI becomes unresponsive if I call the operation directly. ui->comboBox->addItems(obj->getThingsFromDatabase()) I've also tried…
nsejxT nsejxT
  • 87
  • 1
  • 4
1 2 3
12
13