[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] How to get Qt signals delivered to a pure python thread.
From:       Florian Bruhin <me () the-compiler ! org>
Date:       2015-01-08 9:27:47
Message-ID: 20150108092747.GQ25530 () tonks
[Download RAW message or body]

This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

[Attachment #2 (multipart/signed)]
This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.


* Giuseppe Corbelli <giuseppe.corbelli@copanitalia.com> [2015-01-08 10:13:50 +0100]:
> On 08/01/2015 09:00, Ilya Kulakov wrote:
> >More Qt question rather than pyqt, but is it possible to control run time
> >of  an event loop? According to docs, there is just a blocking exec function and
> >it's not possible to run qeventloop for N seconds (as e.g. Cocoa's CFRunLoop).
> 
> Yes, but you can repeatedly call processEvents() in a while loop and
> constantly check the elapsed time.

processEvents has an overload with a maxTime argument, isn't that
exactly what Ilya is looking for?

    Process pending events that match flags for a maximum of maxTime
    milliseconds, or until there are no more events to process,
    whichever is shorter.

http://doc.qt.io/qt-5/qeventloop.html#processEvents-2

Florian

-- 
http://www.the-compiler.org | me@the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/

[Attachment #5 (application/pgp-signature)]
[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic