[SailfishDevel] QThread priority

Andrey Kozhevnikov coderusinbox at gmail.com
Wed May 28 06:16:13 UTC 2014


it can't "doesn't help much". you initializing thread wrong.

simple threading way is:

MyXmlParser *parser = new MyXmlParser(xmlDocument);
QThread *thread = new QThread(parser);
parser->moveToThread(thread);
QObject::connect(thread, SIGNAL(started()), parser, SLOT(parse()));
QObject::connect(parser, SIGNAL(parseComplete(QVariantMap)), this, 
SLOT(onParseComplete(QVariantMap)));
thread->start();

28.05.2014 03:24, Krisztian Olah ?????:
>       Hi list,
>   I have a rather large xml file to parse and it causes the UI to 
> freeze, I assingned the parser to a different thread, but it doesn't 
> help much. According to the Qt documentation QThread::setPriority() 
> doesn't work on Linux, is there some kind of workaround that could be 
> used?
>
> Thanks
> Kris
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140528/c28f0071/attachment.html>


More information about the Devel mailing list