+10  A: 

Mouse events don't occur for each pixel as the mouse moves, on most operating systems. The message handlers (including KDE/linux) repeatedly show mouse movements, but pixels will often be skipped.

You'll need to track the last pixel location, and either draw a line, or add extra points in between the last position and the current position.

Reed Copsey
+3  A: 

You're right - windowing systems don't deliver a mouse move event for every pixel. You need to interpolate a line between the pixels for which you get events.

RichieHindle