Check this example !

http://www.qtcentre.org/threads/1017...nd-custom-axis

put a debug line on 'label' method and you'll see what is going on.