[Qt-interest] QRunnable question
amulya rattan
talk2amulya at gmail.com
Tue May 4 12:26:40 CEST 2010
Forgot to add that I have already considered QtConcurrent. Spent a lot time
on it, learnt, implemented but later found out that only sequence that it
works on are QList and QVector or sequential containers. I have my task
using QMap, an associative one, so that leaves me stranded...
On Tue, May 4, 2010 at 3:53 PM, amulya rattan <talk2amulya at gmail.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100504/df021f71/attachment.html
More information about the Qt-interest-old
mailing list