qt-interest@trolltech.com
[Top] [All Lists]

[Qt-interest] QRunnable question

Subject: [Qt-interest] QRunnable question
From: amulya rattan
Date: Tue, 4 May 2010 15:53:31 +0530
Guys,

Since QRunnable doesn't inherit from QObject, can i do this:

class MyTask : public QObject, public QRunnable
{
    Q_OBJECT
protected:
    void run()
    {
       qDebug() << "asdfa";
    }
}

and expect signal/slots to work? The reason I'd like this to work is i dont want to use QThread, but QThreadPool. My application has a lot of threads already running which i'd like to take advantage of. Secondly, task is heavy so more the threads are working on it, better it would be.

Appreciate any input.

Thanks,
~Amulya
_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest
<Prev in Thread] Current Thread [Next in Thread>