[Qt-interest] QtConcurrent run issues

Cole, Derek dcole at integrity-apps.com
Mon Jun 13 17:46:02 CEST 2011


Thanks - I saw that in the documentation just before the email was sent out. It worked after I added the reference to the object as the first parameter.


________________________________________
From: qt-interest-bounces+dcole=integrity-apps.com at qt.nokia.com [qt-interest-bounces+dcole=integrity-apps.com at qt.nokia.com] on behalf of Thiago Macieira [thiago at kde.org]
Sent: Monday, June 13, 2011 11:34 AM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] QtConcurrent run issues

Em Monday, 13 de June de 2011, às 14:40:27, você escreveu:
> Thanks, but I dont think I want to use a static function right?  My function
> requires knowledge of what is in that instance of the class.
>
> Is there any way to do this as the functions are defined?

Yes, but you need an extra argument:

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

PS: please reply to the mailing list, not to me. (use Reply to List, not Reply
to All)
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358



More information about the Qt-interest-old mailing list