locke
19th March 2010, 11:12
Hi everyone,
Thanks in advance!!
I'm trying to execute a function in background mode:
QFuture<void> future = QtConcurrent::run(this, &MainWindow::myFunction); //myFunction has no input parameters, and returns void
The problem is that, if myFunction doesn't interact with the GUI, then it works. But if it interacts with some element shown on the main window (like a graph, to replot it) then a running time error is thrown.
Is it a normal behavior? How could I execute a function in background mode that interacts with elements on the GUI?
Thank you!
Thanks in advance!!
I'm trying to execute a function in background mode:
QFuture<void> future = QtConcurrent::run(this, &MainWindow::myFunction); //myFunction has no input parameters, and returns void
The problem is that, if myFunction doesn't interact with the GUI, then it works. But if it interacts with some element shown on the main window (like a graph, to replot it) then a running time error is thrown.
Is it a normal behavior? How could I execute a function in background mode that interacts with elements on the GUI?
Thank you!