[Qt-interest] Mouse Event Queue and slow response application

Agus Syawal alfonsus_agus at yahoo.com
Mon Oct 5 10:32:22 CEST 2009


Hello,


I'll be very grateful if anyone of you have a hint or solution for my program.
I made and run Qt application in a board, suffice to say that its response time is slow.
The application itself is a kind of svg viewer, with a row of buttons in the bottom. I click one button, the svg related to that button is shown.
Svg render time is quite a problem, so I put "LOADING" label in the middle of the viewer. 
I loop all buttons I have and setEnabled(false).
Why I do this, is to prevent user clicking other buttons while loading.
After the image is rendered, I loop the buttons again to setEnabled(true).

Then, here my problem lies.
It happens, perhaps because of the board is slow, during loading, I clicked several buttons.
The effect is not immediate, it is as if the clicks are ignored.

After loading is finished, the last button I click usually will be clicked and load the Svg.
I think it is a kind of lag. The last 'click' event is acted upon when the buttons setEnabled(true) finished.
This gives impression that even when the buttons are disabled, they still able to receive click.

So, I think one solution is to clear all those clicks registered which is not yet acted upon when the svg loading is finished.
Is there a way to do this?


Regards,
Agus S Y


      



More information about the Qt-interest-old mailing list