Hi,
I am currently working on a project for my diploma.
My job is it to extend a qt standalone application to something vnc-like client/server application for remote support.
What I have done so far:
I have installed an event filter on the client side that catches mouse/user events.
After serialization the captured event is send with some qwidget information (name, size etc.) over a qtcpsocket to the remote peer.
There the event is deserialized and the qwidget is identified by the details (doing some search in QApplication::allWidgets). The event is finally posted via QCoreApplication:: postEvent method.
Everything works as expected so far.
But now I found that there are two cases in which the above described approach does not seem to work and I cannot figure out what happens:
When the application is running into a while loop and QApplication:: processEvents is called within this loop or a QDialog is executed (not shown) elsewhere instead, cpu usage becomes 100% after a while and finally the peer application crashes. What seems very strange to me is that the cpu usage increases and the application crashes even if no mouse events are send to the peer (no user / socket interaction in that case, just an open (modal) QDialog...)
The problem seems to be the call to processEvents as this is used in the exec() method of QDialog, too.
Can someone give me some hints what might be the problem in this case?
Thank you in advance.
Winni
Bookmarks