In QwtPlotPicker::trackerTextF() you have the x and the y value ( in plot coordinates ) of the mouse position. All you need to do is to call QwtRasterData::z() with them and to build and return the string from the x,y,z values you want to be displayed.

Uwe