mouse move events in n810
Hello,
I recompiled the scribble example of Qt to run on n810. It is working but the scribbling is not smooth. It seems the mouse move events are not triggered properly. Is there any solution to it?
Link to scribble example- [url]http://doc.trolltech.com/4.3/widgets-scribble.html[/url]
A detailed explanation of the problem: In Scribble example of Qt, we can draw over an image using mouse. It starts the drawing when mouse press event is triggered and as we move the mouse (while it is pressed) the application keeps on connecting the coordinates(using drawLine()) through which the mouse passes. This stops on mouse release. So if you draw a circle, each adjacent point on the circle will be connected by a line and so it will look like a smooth circle. It works perfectly on my x86 laptop. Now I have recompiled for running on maemo 4 running on n810. When I try to draw on it, it does not draw smoothly. If I try to draw a circle, it will connect a few dots on the circle by using lines. Possibly this is because mouse move event is NOT triggered at each little movement of the stylus.
Thanks in advance,
Akshey
Re: mouse move events in n810
You may verify that events are coming from X sever properly in osso-sketch application, which has similar functionality.
It's hard to say what is wrong as I don't have possibility to test it on the real device, but what could be potentially wrong is
ScribbleArea::mouseMoveEvent. There is a check for Qt::LeftButton, which could fail for some reason. You can add debug messages to mouse event handlers:
qWarning() << event;
to debug the issue.
Re: mouse move events in n810
There is a performance issue with scribble example, it redraws whole widget are on every mouseMoveEvent.
You can download fixed scribble example from here:
[url]http://qt.gitorious.org/qt/qt-maemo/archive-tarball/4.6-vanilla-scribble-fix[/url]