PDA

View Full Version : Lost events.



chris_helloworld
15th September 2010, 10:49
Hi,
I have a GUI application which uses a QTimer to refresh itself, making a number of database calls in the timer handling slot. This mostly works fine, except, that I'm occassionally loosing key events and mouse events.

Any ideas as to what might be happening ?

Thanks in advance,
Chris.

nish
15th September 2010, 11:42
Are the key events are lost completely or they are delivered after a short delay/jerk?

chris_helloworld
15th September 2010, 11:45
Lost completely. For example typing 1234567890 into a text edit may result in 12890 appearing.

wysota
15th September 2010, 12:34
Try delegating the database calls to a thread (remember you need to have a separate database connection for each thread).

chris_helloworld
15th September 2010, 13:33
Yes, thats going to be my next step, though I'd have liked to have understood where my events were being lost.

wysota
15th September 2010, 14:36
Probably in the windowing system.