Reputation: 1722
I am writing a new platform plugin for qt, i am trying to understand what is the "processEvents" virtual method supposed to do ? my requirement is that i receive events on a file descriptor and am supposed to translate them to qt gui events and pass them over to the qt. pls advise.
Upvotes: 2
Views: 447
Reputation: 98425
You can use a QSocketNotifier
for this. Note that a QSocketNotifier
takes a file handle only on Unix systems. On Windows, it takes a special winsock handle that is not a generalized HANDLE to an event object, neither is it a file handle. Don't worry about processEvents
, it's not relevant to your problem.
Upvotes: 2
Reputation: 1254
From documentation http://qt-project.org/doc/qt-4.8/qcoreapplication.html#processEvents :
Processes all pending events for the calling thread according to the specified flags until there are no more events to process.
You can call this function occasionally when your program is busy performing a long operation (e.g. copying a file).
This is probably not what you are looking for. Based on the short description of your problem, it seems to me that you want Linux's poll(). http://linux.die.net/man/2/poll
Upvotes: 3