KRuler displays on screen a ruler measuring pixels. Position the 0 to your starting point (simple drag it), and read off the precise pixel count to your cursor. To change the length of the ruler just drag the sides.
The context menu allows you to
For more information you can read the manual.