[Qt-interest] QtConcurrent run issues

Cole, Derek dcole at integrity-apps.com
Sun Jun 12 21:05:10 CEST 2011


Hello.

I am trying to use a function that is in one of my subclasses with QtConcurrent run to allow the function to run in a differen thread.

The function declaration is such:

void ImagePixmapItem::LoadTilePixmap(ImagePixmapItem *temp);

and I am trying to use it like so from another function in my ImagePixmapItem (which is a subclass of QObject and QGraphicsItem)


QFuture<void> future = QtConcurrent::run(LoadTilePixmap, this);

This is giving me the following error message:

/home/dcole/IM/work/ext/VC/IMViewer-build-desktop/../IMViewer/imagepixmapitem.cpp:106: error: no matching function for call to ‘run(<unresolved overloaded function type>, ImagePixmapItem* const)’

I must be doing something wrong – can anyone tell me what it is? Also – I have had to include QtConcurrentRun with my code , but according to the documentation, I thought this was part of QtConcurrent, and you got it for free with QtCore?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110612/0c782d6b/attachment.html 


More information about the Qt-interest-old mailing list