[PyQt] wx.MilliSleep equivalent

Kyle Altendorf sda at fstab.net
Tue Oct 2 02:13:52 BST 2018


https://wxpython.org/Phoenix/docs/html/wx.functions.html#wx.MilliSleep

I don't see a mention of non-blocking there. Can you share your overall goal and context?  Maybe a complete example showing what happened and what you didn't like about process events?

Cheers,
-kyle

On October 1, 2018 5:02:58 PM EDT, Tong Zhang <warriorlance at gmail.com> wrote:
>Hello Chris,
>
>Thanks, I've tried like this:
>
>from PyQt5.QtCore import QCoreApplication
>from PyQt5.QtCore import QEventLoop
>
>QCoreApplication.processEvents(QEventLoop.WaitForMoreEvents, msec)
>
>but had no luck, it does not behavior the same as qWait(msec). Did I
>use 
>this method correctly?
>
>Tong
>
>On 09/22/2018 02:02 AM, Chris Pezley wrote:
>> Hi Tong,
>> 
>> maybe what you want is "QtWidgets.qApp.processEvents()"? (make sure
>to 
>> look at the one with the optional argument for maxtime)
>> http://doc.qt.io/qt-5/qcoreapplication.html#processEvents-1
>> 
>> On 21/09/2018 20.22, Tong Zhang wrote:
>>> Hello,
>>>
>>> When I'm building applications by wxPython, there is a function 
>>> wx.MilliSleep could be used to do non-GUI-block sleep, while I
>cannot 
>>> find the similar thing in PyQt, is it available or not? Otherwise, 
>>> what I can do to is to use QThread. Any comment is appreciated!
>>>
>>> Tong
>>>
>>>
>>> _______________________________________________
>>> PyQt mailing listPyQt at riverbankcomputing.com
>>> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> 
>> 
>> 
>> 
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>> 
>_______________________________________________
>PyQt mailing list    PyQt at riverbankcomputing.com
>https://www.riverbankcomputing.com/mailman/listinfo/pyqt


More information about the PyQt mailing list