Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QCoreApplication::processEvents ( QEventLoop::ProcessEventsFlags  flags,
int  maxtime 
) [static]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Processes pending events for the calling thread for maxtime milliseconds or until there are no more events to process, whichever is shorter.

You can call this function occasionally when you program is busy doing a long operation (e.g. copying a file).

Calling this function processes events only for the calling thread.

See also:
exec(), QTimer, QEventLoop::processEvents()

Definition at line 715 of file qcoreapplication.cpp.

References QTime::elapsed(), and QTime::start().

    QThreadData *data = QThreadData::current();
    if (!data->eventDispatcher)
    QTime start;
    while (data->eventDispatcher->processEvents(flags & ~QEventLoop::WaitForMoreEvents)) {
        if (start.elapsed() > maxtime)

Generated by  Doxygen 1.6.0   Back to index