QtConcurrent::run() pour une fonction membre
Bonjour,
je souhaiterais utiliser la fonction run de QtConcurrent mais je trouve aucun exemple qui me permet de comprendre son fonctionnement.
Je souhaiterais appeler une fonction d'une classe du genre :
Code:
1 2 3 4 5 6 7 8 9
| void Toto::traitement(arg1,arg2,arg3, ...)
{
while(1){ }
}
void Toto::tutu()
{
QFuture<void> task = QtConcurrent::run(Toto::traitement,arg1,arg2,arg3, ...);
} |
J'ai regardé la doc sur http://qt.developpez.com/doc/latest/qtconcurrentrun/, mais comment faire pour une fonction membre.
Merci.